adding three x-failing tests for issue88, issue93 and related issues
--HG-- branch : trunk
This commit is contained in:
parent
169d8d1e54
commit
91880ffc19
|
@ -167,3 +167,12 @@ objects containing global state. Often using them is not
|
||||||
neccessary. This is about trying to get rid of them, i.e.
|
neccessary. This is about trying to get rid of them, i.e.
|
||||||
deprecating them and checking with PyPy's usages as well
|
deprecating them and checking with PyPy's usages as well
|
||||||
as others.
|
as others.
|
||||||
|
|
||||||
|
remove deprecated bits in collect.py
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
tags: feature 1.4
|
||||||
|
|
||||||
|
In an effort to further simplify code, review and remove deprecated bits
|
||||||
|
in collect.py. Probably good:
|
||||||
|
- inline consider_file/dir methods, no need to have them
|
||||||
|
subclass-overridable because of hooks
|
||||||
|
|
|
@ -105,3 +105,45 @@ class TestGeneralUsage:
|
||||||
"*1 passed*",
|
"*1 passed*",
|
||||||
"*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()
|
||||||
|
|
Loading…
Reference in New Issue