diff options
author | Daniel Hahler <git@thequod.de> | 2020-02-01 21:41:25 +0100 |
---|---|---|
committer | Daniel Hahler <git@thequod.de> | 2020-02-01 23:48:57 +0100 |
commit | 09a0e454923f3c22bc985ef42e789c5e0b0c0179 (patch) | |
tree | 6f5a3ed9c42221a2f6bb4526037ebae109adc585 /testing/test_pytester.py | |
parent | 3645ba3072565fda6c57816b3be7fc114f41ce9f (diff) | |
download | pytest-09a0e454923f3c22bc985ef42e789c5e0b0c0179.tar.gz |
testing/test_pytester.py: cosmetics
Diffstat (limited to 'testing/test_pytester.py')
-rw-r--r-- | testing/test_pytester.py | 6 |
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: |