[svn r62610] finally fixed a bug related to the global SetupState

for test functions.  streamlined  testdir.inline_run
functions.  well killed most of them.

--HG--
branch : trunk
This commit is contained in:
hpk
2009-03-05 22:01:08 +01:00
parent 7688f88c4f
commit 62b36a91a0
4 changed files with 40 additions and 44 deletions
@@ -90,11 +90,8 @@ class TestAsyncFunctional:
# assert py.__file__ != '%s'
""" % (tmpdir.join(subdir), py.__file__)))
destdir.join("py").mksymlinkto(py.path.local(py.__file__).dirpath())
config = py.test.config._reparse([tmpdir.join(subdir)])
assert config.topdir == tmpdir
assert not tmpdir.join("__init__.py").check()
dist = DSession(config)
sorter = testdir.inline_runsession(dist)
sorter = testdir.inline_run(tmpdir.join(subdir))
testevents = sorter.getnamed('itemtestreport')
assert len([x for x in testevents if x.passed]) == 2
assert len([x for x in testevents if x.failed]) == 3