Merge pull request #4986 from blueyed/fnmatch_lines-list
tests: fnmatch_lines: use list
This commit is contained in:
@@ -558,7 +558,7 @@ class TestFunction(object):
|
||||
"""
|
||||
)
|
||||
result = testdir.runpytest()
|
||||
result.stdout.fnmatch_lines("* 2 passed, 1 skipped in *")
|
||||
result.stdout.fnmatch_lines(["* 2 passed, 1 skipped in *"])
|
||||
|
||||
def test_parametrize_skip(self, testdir):
|
||||
testdir.makepyfile(
|
||||
@@ -573,7 +573,7 @@ class TestFunction(object):
|
||||
"""
|
||||
)
|
||||
result = testdir.runpytest()
|
||||
result.stdout.fnmatch_lines("* 2 passed, 1 skipped in *")
|
||||
result.stdout.fnmatch_lines(["* 2 passed, 1 skipped in *"])
|
||||
|
||||
def test_parametrize_skipif_no_skip(self, testdir):
|
||||
testdir.makepyfile(
|
||||
@@ -588,7 +588,7 @@ class TestFunction(object):
|
||||
"""
|
||||
)
|
||||
result = testdir.runpytest()
|
||||
result.stdout.fnmatch_lines("* 1 failed, 2 passed in *")
|
||||
result.stdout.fnmatch_lines(["* 1 failed, 2 passed in *"])
|
||||
|
||||
def test_parametrize_xfail(self, testdir):
|
||||
testdir.makepyfile(
|
||||
@@ -603,7 +603,7 @@ class TestFunction(object):
|
||||
"""
|
||||
)
|
||||
result = testdir.runpytest()
|
||||
result.stdout.fnmatch_lines("* 2 passed, 1 xfailed in *")
|
||||
result.stdout.fnmatch_lines(["* 2 passed, 1 xfailed in *"])
|
||||
|
||||
def test_parametrize_passed(self, testdir):
|
||||
testdir.makepyfile(
|
||||
@@ -618,7 +618,7 @@ class TestFunction(object):
|
||||
"""
|
||||
)
|
||||
result = testdir.runpytest()
|
||||
result.stdout.fnmatch_lines("* 2 passed, 1 xpassed in *")
|
||||
result.stdout.fnmatch_lines(["* 2 passed, 1 xpassed in *"])
|
||||
|
||||
def test_parametrize_xfail_passed(self, testdir):
|
||||
testdir.makepyfile(
|
||||
@@ -633,7 +633,7 @@ class TestFunction(object):
|
||||
"""
|
||||
)
|
||||
result = testdir.runpytest()
|
||||
result.stdout.fnmatch_lines("* 3 passed in *")
|
||||
result.stdout.fnmatch_lines(["* 3 passed in *"])
|
||||
|
||||
def test_function_original_name(self, testdir):
|
||||
items = testdir.getitems(
|
||||
@@ -831,7 +831,7 @@ class TestConftestCustomization(object):
|
||||
)
|
||||
# Use runpytest_subprocess, since we're futzing with sys.meta_path.
|
||||
result = testdir.runpytest_subprocess()
|
||||
result.stdout.fnmatch_lines("*1 passed*")
|
||||
result.stdout.fnmatch_lines(["*1 passed*"])
|
||||
|
||||
|
||||
def test_setup_only_available_in_subdir(testdir):
|
||||
@@ -1296,14 +1296,14 @@ def test_keep_duplicates(testdir):
|
||||
def test_package_collection_infinite_recursion(testdir):
|
||||
testdir.copy_example("collect/package_infinite_recursion")
|
||||
result = testdir.runpytest()
|
||||
result.stdout.fnmatch_lines("*1 passed*")
|
||||
result.stdout.fnmatch_lines(["*1 passed*"])
|
||||
|
||||
|
||||
def test_package_collection_init_given_as_argument(testdir):
|
||||
"""Regression test for #3749"""
|
||||
p = testdir.copy_example("collect/package_init_given_as_arg")
|
||||
result = testdir.runpytest(p / "pkg" / "__init__.py")
|
||||
result.stdout.fnmatch_lines("*1 passed*")
|
||||
result.stdout.fnmatch_lines(["*1 passed*"])
|
||||
|
||||
|
||||
def test_package_with_modules(testdir):
|
||||
|
||||
@@ -536,7 +536,7 @@ class TestRequestBasic(object):
|
||||
"""
|
||||
)
|
||||
result = testdir.runpytest_subprocess()
|
||||
result.stdout.fnmatch_lines("* 1 passed in *")
|
||||
result.stdout.fnmatch_lines(["* 1 passed in *"])
|
||||
|
||||
def test_getfixturevalue_recursive(self, testdir):
|
||||
testdir.makeconftest(
|
||||
@@ -598,7 +598,7 @@ class TestRequestBasic(object):
|
||||
"""
|
||||
)
|
||||
result = testdir.runpytest()
|
||||
result.stdout.fnmatch_lines("* 2 passed in *")
|
||||
result.stdout.fnmatch_lines(["* 2 passed in *"])
|
||||
|
||||
@pytest.mark.parametrize("getfixmethod", ("getfixturevalue", "getfuncargvalue"))
|
||||
def test_getfixturevalue(self, testdir, getfixmethod):
|
||||
@@ -787,7 +787,7 @@ class TestRequestBasic(object):
|
||||
"""Regression test for #3057"""
|
||||
testdir.copy_example("fixtures/test_getfixturevalue_dynamic.py")
|
||||
result = testdir.runpytest()
|
||||
result.stdout.fnmatch_lines("*1 passed*")
|
||||
result.stdout.fnmatch_lines(["*1 passed*"])
|
||||
|
||||
def test_funcargnames_compatattr(self, testdir):
|
||||
testdir.makepyfile(
|
||||
@@ -1527,7 +1527,7 @@ class TestFixtureManagerParseFactories(object):
|
||||
def test_collect_custom_items(self, testdir):
|
||||
testdir.copy_example("fixtures/custom_item")
|
||||
result = testdir.runpytest("foo")
|
||||
result.stdout.fnmatch_lines("*passed*")
|
||||
result.stdout.fnmatch_lines(["*passed*"])
|
||||
|
||||
|
||||
class TestAutouseDiscovery(object):
|
||||
@@ -2609,7 +2609,7 @@ class TestFixtureMarker(object):
|
||||
)
|
||||
reprec = testdir.runpytest("-s")
|
||||
for test in ["test_browser"]:
|
||||
reprec.stdout.fnmatch_lines("*Finalized*")
|
||||
reprec.stdout.fnmatch_lines(["*Finalized*"])
|
||||
|
||||
def test_class_scope_with_normal_tests(self, testdir):
|
||||
testpath = testdir.makepyfile(
|
||||
@@ -3450,7 +3450,7 @@ class TestContextManagerFixtureFuncs(object):
|
||||
"""
|
||||
)
|
||||
result = testdir.runpytest("-s")
|
||||
result.stdout.fnmatch_lines("*mew*")
|
||||
result.stdout.fnmatch_lines(["*mew*"])
|
||||
|
||||
|
||||
class TestParameterizedSubRequest(object):
|
||||
|
||||
Reference in New Issue
Block a user