simplify test_conftest_found_with_double_dash() test code

This commit is contained in:
Jurko Gospodnetić 2017-12-11 15:10:04 +01:00
parent 73bc6bacfa
commit 3b85e0c3a9
1 changed files with 1 additions and 5 deletions

View File

@ -270,11 +270,7 @@ def test_conftest_found_with_double_dash(testdir):
parser.addoption("--hello-world", action="store_true")
"""))
p = sub.join("test_hello.py")
p.write(py.std.textwrap.dedent("""
import pytest
def test_hello(found):
assert found == 1
"""))
p.write("def test_hello(): pass")
result = testdir.runpytest(str(p) + "::test_hello", "-h")
result.stdout.fnmatch_lines("""
*--hello-world*