make setupevent tests of pytest_runner.py work

--HG--
branch : trunk
This commit is contained in:
holger krekel
2009-05-22 19:56:05 +02:00
parent 30e04b1ec6
commit b8926f59da
18 changed files with 368 additions and 487 deletions

View File

@@ -176,7 +176,7 @@ class TestCollectPluginHooks:
assert "world" in wascalled
# make sure the directories do not get double-appended
colreports = reprec.getreports("pytest_collectreport")
names = [rep.colitem.name for rep in colreports]
names = [rep.collector.name for rep in colreports]
assert names.count("hello") == 1
class TestCustomConftests:
@@ -214,8 +214,8 @@ class TestCustomConftests:
""")
testdir.mkdir("hello")
reprec = testdir.inline_run(testdir.tmpdir)
names = [rep.colitem.name for rep in reprec.getreports("pytest_collectreport")]
names = [rep.collector.name for rep in reprec.getreports("pytest_collectreport")]
assert 'hello' not in names
reprec = testdir.inline_run(testdir.tmpdir, "--XX")
names = [rep.colitem.name for rep in reprec.getreports("pytest_collectreport")]
names = [rep.collector.name for rep in reprec.getreports("pytest_collectreport")]
assert 'hello' in names