[pypy-commit] buildbot buildbot-0.8.7: fix test_build tests

bivab noreply at buildbot.pypy.org
Mon Apr 29 11:02:04 CEST 2013


Author: David Schneider <david.schneider at picle.org>
Branch: buildbot-0.8.7
Changeset: r810:91a1ce34b245
Date: 2013-04-28 20:04 +0200
http://bitbucket.org/pypy/buildbot/changeset/91a1ce34b245/

Log:	fix test_build tests

diff --git a/bot2/pypybuildbot/test/test_builds.py b/bot2/pypybuildbot/test/test_builds.py
--- a/bot2/pypybuildbot/test/test_builds.py
+++ b/bot2/pypybuildbot/test/test_builds.py
@@ -5,8 +5,7 @@
 class FakeProperties(object):
 
     def __init__(self):
-        from buildbot.process.properties import PropertyMap
-        self.pmap = PropertyMap(self)
+        pass
     
     def __getitem__(self, item):
         if item == 'branch':
@@ -42,15 +41,16 @@
         return FakeDeferred()
 
 def test_Translate():
-    expected = ['translate.py', '--batch', '-O0',
+    expected = ['pypy', '../../rpython/bin/rpython', '--batch', '-O0',
                 'targetpypystandalone', '--no-allworkingmodules']
 
     translateInst = builds.Translate(['-O0'], ['--no-allworkingmodules'])
 
     assert translateInst.command[-len(expected):] == expected
     
-    translateFactory, kw = translateInst.factory
-    rebuiltTranslate = translateFactory(**kw)
+    translateFactory = translateInst._getStepFactory().factory
+    args = translateInst._getStepFactory().args
+    rebuiltTranslate = translateFactory(*args)
                 
     assert rebuiltTranslate.command[-len(expected):] == expected
 
@@ -64,7 +64,8 @@
     inst = builds.PyPyUpload(slavesrc='slavesrc', masterdest=str(pth.join('mstr')),
                              basename='base-%(final_file_name)s', workdir='.',
                              blocksize=100)
-    factory, kw = inst.factory
+    factory = inst._getStepFactory().factory
+    kw = inst._getStepFactory().kwargs
     rebuilt = factory(**kw)
     rebuilt.build = FakeBuild()
     rebuilt.step_status = FakeStepStatus()


More information about the pypy-commit mailing list