shorten some test code

This commit is contained in:
Jurko Gospodnetić 2017-12-01 13:28:39 +01:00
parent 596937e610
commit f0bfe9de3d
2 changed files with 3 additions and 3 deletions

View File

@ -215,8 +215,8 @@ class TestGeneralUsage(object):
assert not result.ret
def test_issue109_sibling_conftests_not_loaded(self, testdir):
sub1 = testdir.tmpdir.mkdir("sub1")
sub2 = testdir.tmpdir.mkdir("sub2")
sub1 = testdir.mkdir("sub1")
sub2 = testdir.mkdir("sub2")
sub1.join("conftest.py").write("assert 0")
result = testdir.runpytest(sub2)
assert result.ret == EXIT_NOTESTSCOLLECTED

View File

@ -84,7 +84,7 @@ def test_conftest_in_nonpkg_with_init(tmpdir):
def test_doubledash_considered(testdir):
conf = testdir.mkdir("--option")
conf.join("conftest.py").ensure()
conf.ensure("conftest.py")
conftest = PytestPluginManager()
conftest_setinitial(conftest, [conf.basename, conf.basename])
values = conftest._getconftestmodules(conf)