[py-svn] r33170 - py/dist/py/test/rsession/testing
fijal at codespeak.net
fijal at codespeak.net
Wed Oct 11 16:50:12 CEST 2006
Author: fijal
Date: Wed Oct 11 16:50:10 2006
New Revision: 33170
Modified:
py/dist/py/test/rsession/testing/test_slave.py
Log:
Fixed tests.
Modified: py/dist/py/test/rsession/testing/test_slave.py
==============================================================================
--- py/dist/py/test/rsession/testing/test_slave.py (original)
+++ py/dist/py/test/rsession/testing/test_slave.py Wed Oct 11 16:50:10 2006
@@ -116,9 +116,19 @@
def test_slave_setup_fails_on_import_error():
from py.__.test.rsession.slave import setup
tmp = py.test.ensuretemp("slavesetup")
- class C:
+ class C:
+ def __init__(self):
+ self.count = 0
+
def receive(self):
- return str(tmp)
+ if self.count == 0:
+ retval = str(tmp)
+ elif self.count == 1:
+ retval = {}
+ else:
+ raise NotImplementedError("mora data")
+ self.count += 1
+ return retval
try:
exec py.code.Source(setup, "setup()").compile() in {
'channel': C()}
@@ -132,8 +142,18 @@
tmp = py.test.ensuretemp("slavesetup2")
x = tmp.ensure("sometestpackage", "__init__.py")
class C:
+ def __init__(self):
+ self.count = 0
+
def receive(self):
- return str(x.dirpath())
+ if self.count == 0:
+ retval = str(x.dirpath())
+ elif self.count == 1:
+ retval = {}
+ else:
+ raise NotImplementedError("mora data")
+ self.count += 1
+ return retval
try:
exec py.code.Source(setup, "setup()").compile() in {'channel': C()}
except AttributeError: # channel.send
More information about the pytest-commit
mailing list