#1642 Fix rootdir option
This commit is contained in:
@@ -266,21 +266,3 @@ def test_rootdir_option_arg(testdir):
|
||||
|
||||
result = testdir.runpytest("--rootdir=root")
|
||||
result.stdout.fnmatch_lines(["*1 passed*"])
|
||||
|
||||
|
||||
def test_rootdir_option_ini_file(testdir):
|
||||
rootdir = testdir.mkdir("root")
|
||||
rootdir.join("spoon.py").write("spoon_number = 1")
|
||||
testsdir = rootdir.mkdir("tests")
|
||||
testsdir.join("test_one.py").write("from spoon import spoon_number\ndef test_one():\n assert spoon_number")
|
||||
|
||||
result = testdir.runpytest()
|
||||
result.stdout.fnmatch_lines(["*No module named*spoon*"])
|
||||
testdir.makeini("""
|
||||
[pytest]
|
||||
rootdir=root
|
||||
""")
|
||||
result = testdir.runpytest()
|
||||
result.stdout.fnmatch_lines(["*1 passed*"])
|
||||
result = testdir.runpytest("--rootdir=ignored_argument")
|
||||
result.stdout.fnmatch_lines(["*1 passed*"])
|
||||
|
||||
Reference in New Issue
Block a user