move conftest visibility tests and their setup into a class, accomodates @nicoddemus 's comment
--HG-- branch : issue616
This commit is contained in:
parent
d73e689991
commit
28c2327f73
|
@ -259,9 +259,8 @@ def test_conftest_found_with_double_dash(testdir):
|
||||||
""")
|
""")
|
||||||
|
|
||||||
|
|
||||||
# conftest visibility, related to issue616
|
class TestConftestVisibility:
|
||||||
|
def _setup_tree(self, testdir): # for issue616
|
||||||
def _setup_tree(testdir):
|
|
||||||
# example mostly taken from:
|
# example mostly taken from:
|
||||||
# https://mail.python.org/pipermail/pytest-dev/2014-September/002617.html
|
# https://mail.python.org/pipermail/pytest-dev/2014-September/002617.html
|
||||||
runner = testdir.mkdir("empty")
|
runner = testdir.mkdir("empty")
|
||||||
|
@ -335,8 +334,8 @@ def _setup_tree(testdir):
|
||||||
])
|
])
|
||||||
@pytest.mark.issue616
|
@pytest.mark.issue616
|
||||||
def test_parsefactories_relative_node_ids(
|
def test_parsefactories_relative_node_ids(
|
||||||
testdir, chdir,testarg, expect_ntests_passed):
|
self, testdir, chdir,testarg, expect_ntests_passed):
|
||||||
dirs = _setup_tree(testdir)
|
dirs = self._setup_tree(testdir)
|
||||||
print("pytest run in cwd: %s" %(
|
print("pytest run in cwd: %s" %(
|
||||||
dirs[chdir].relto(testdir.tmpdir)))
|
dirs[chdir].relto(testdir.tmpdir)))
|
||||||
print("pytestarg : %s" %(testarg))
|
print("pytestarg : %s" %(testarg))
|
||||||
|
|
Loading…
Reference in New Issue