diff options
Diffstat (limited to 'tests/test_epylint.py')
-rw-r--r-- | tests/test_epylint.py | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/tests/test_epylint.py b/tests/test_epylint.py index e1b090395..7e9116e99 100644 --- a/tests/test_epylint.py +++ b/tests/test_epylint.py @@ -25,12 +25,12 @@ def example_path(tmp_path: PosixPath) -> PosixPath: def test_epylint_good_command(example_path: PosixPath) -> None: - out, err = lint.py_run( - # pylint: disable-next=consider-using-f-string - "%s -E --disable=E1111 --msg-template '{category} {module} {obj} {line} {column} {msg}'" - % example_path, - return_std=True, - ) + with pytest.warns(DeprecationWarning): + out, _ = lint.py_run( + f"{example_path} -E --disable=E1111 --msg-template " + "'{category} {module} {obj} {line} {column} {msg}'", + return_std=True, + ) msg = out.read() assert ( msg @@ -39,16 +39,16 @@ def test_epylint_good_command(example_path: PosixPath) -> None: error my_app IvrAudioApp.run 4 8 Instance of 'IvrAudioApp' has no 'hassan' member """ ) - assert err.read() == "" def test_epylint_strange_command(example_path: PosixPath) -> None: - out, err = lint.py_run( - # pylint: disable-next=consider-using-f-string - "%s -E --disable=E1111 --msg-template={category} {module} {obj} {line} {column} {msg}" - % example_path, - return_std=True, - ) + with pytest.warns(DeprecationWarning): + out, _ = lint.py_run( + # pylint: disable-next=consider-using-f-string + "%s -E --disable=E1111 --msg-template={category} {module} {obj} {line} {column} {msg}" + % example_path, + return_std=True, + ) assert ( out.read() == """\ @@ -66,4 +66,3 @@ def test_epylint_strange_command(example_path: PosixPath) -> None: error """ ) - assert err.read() == "" |