adding three x-failing tests for issue88, issue93 and related issues

--HG--
branch : trunk
This commit is contained in:
holger krekel
2010-05-14 12:02:43 +02:00
parent 169d8d1e54
commit 91880ffc19
2 changed files with 51 additions and 0 deletions

View File

@@ -105,3 +105,45 @@ class TestGeneralUsage:
"*1 passed*",
"*1 passed*",
])
@py.test.mark.xfail
def test_early_skip(self, testdir):
testdir.mkdir("xyz")
testdir.makeconftest("""
import py
def pytest_collect_directory():
py.test.skip("early")
""")
result = testdir.runpytest()
assert result.ret == 0
result.stdout.fnmatch_lines([
"*1 skip*"
])
@py.test.mark.xfail
def test_issue88_initial_file_multinodes(self, testdir):
testdir.makeconftest("""
import py
class MyFile(py.test.collect.File):
def collect(self):
return
def pytest_collect_file(path, parent):
return MyFile(path, parent)
""")
p = testdir.makepyfile("def test_hello(): pass")
result = testdir.runpytest(p, "--collectonly")
result.stdout.fnmatch_lines([
"*MyFile*test_issue88*",
"*Module*test_issue88*",
])
@py.test.mark.xfail
def test_issue93_initialnode_importing_capturing(self, testdir):
testdir.makeconftest("""
print "should not be seen"
""")
result = testdir.runpytest()
assert result.ret == 0
assert "should not be seen" not in result.stdout.str()