summaryrefslogtreecommitdiff
path: root/testing/test_pytester.py
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2020-02-01 21:41:25 +0100
committerDaniel Hahler <git@thequod.de>2020-02-01 23:48:57 +0100
commit09a0e454923f3c22bc985ef42e789c5e0b0c0179 (patch)
tree6f5a3ed9c42221a2f6bb4526037ebae109adc585 /testing/test_pytester.py
parent3645ba3072565fda6c57816b3be7fc114f41ce9f (diff)
downloadpytest-09a0e454923f3c22bc985ef42e789c5e0b0c0179.tar.gz
testing/test_pytester.py: cosmetics
Diffstat (limited to 'testing/test_pytester.py')
-rw-r--r--testing/test_pytester.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/testing/test_pytester.py b/testing/test_pytester.py
index 35a06e33a..2e61632fd 100644
--- a/testing/test_pytester.py
+++ b/testing/test_pytester.py
@@ -459,14 +459,12 @@ def test_testdir_run_timeout_expires(testdir) -> None:
def test_linematcher_with_nonlist() -> None:
"""Test LineMatcher with regard to passing in a set (accidentally)."""
lm = LineMatcher([])
-
with pytest.raises(AssertionError):
lm.fnmatch_lines(set())
with pytest.raises(AssertionError):
lm.fnmatch_lines({})
lm.fnmatch_lines([])
lm.fnmatch_lines(())
-
assert lm._getlines({}) == {}
assert lm._getlines(set()) == set()
@@ -500,7 +498,7 @@ def test_linematcher_match_failure() -> None:
@pytest.mark.parametrize("function", ["no_fnmatch_line", "no_re_match_line"])
-def test_no_matching(function) -> None:
+def test_linematcher_no_matching(function) -> None:
if function == "no_fnmatch_line":
good_pattern = "*.py OK*"
bad_pattern = "*X.py OK*"
@@ -548,7 +546,7 @@ def test_no_matching(function) -> None:
func(bad_pattern) # bad pattern does not match any line: passes
-def test_no_matching_after_match() -> None:
+def test_linematcher_no_matching_after_match() -> None:
lm = LineMatcher(["1", "2", "3"])
lm.fnmatch_lines(["1", "3"])
with pytest.raises(Failed) as e: