#1642 Fix tests
This commit is contained in:
parent
9f1772e679
commit
936651702b
|
@ -279,9 +279,11 @@ def test_rootdir_option_arg(testdir, path):
|
||||||
|
|
||||||
|
|
||||||
def test_rootdir_wrong_option_arg(testdir):
|
def test_rootdir_wrong_option_arg(testdir):
|
||||||
rootdir = testdir.mkdir("root")
|
testdir.makepyfile("""
|
||||||
testsdir = rootdir.mkdir("tests")
|
import os
|
||||||
testsdir.join("test_one.py").write("def test_one():\n assert 1")
|
def test_one():
|
||||||
|
assert 1
|
||||||
|
""")
|
||||||
|
|
||||||
result = testdir.runpytest("--rootdir=wrong_dir")
|
result = testdir.runpytest("--rootdir=wrong_dir")
|
||||||
result.stderr.fnmatch_lines(["*Directory *wrong_dir* not found. Check your '--rootdir' option.*"])
|
result.stderr.fnmatch_lines(["*Directory *wrong_dir* not found. Check your '--rootdir' option.*"])
|
||||||
|
|
Loading…
Reference in New Issue