This commit is contained in:
feuillemorte 2018-02-01 00:27:48 +03:00
parent 9f1772e679
commit 936651702b
1 changed files with 5 additions and 3 deletions

View File

@ -279,9 +279,11 @@ def test_rootdir_option_arg(testdir, path):
def test_rootdir_wrong_option_arg(testdir):
rootdir = testdir.mkdir("root")
testsdir = rootdir.mkdir("tests")
testsdir.join("test_one.py").write("def test_one():\n assert 1")
testdir.makepyfile("""
import os
def test_one():
assert 1
""")
result = testdir.runpytest("--rootdir=wrong_dir")
result.stderr.fnmatch_lines(["*Directory *wrong_dir* not found. Check your '--rootdir' option.*"])