diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2020-11-14 15:59:36 +0100 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2020-11-28 16:09:53 +0100 |
commit | e83e7792e5a90d13e9fc5f2c003f45f0e80ff5dd (patch) | |
tree | 915bb2267f2bc52ae99d268237a95a670f035134 | |
parent | e98d371f6f54c5086710792ef4858db57bf1e1d9 (diff) | |
download | pylint-git-e83e7792e5a90d13e9fc5f2c003f45f0e80ff5dd.tar.gz |
Silence expected deprecations warning in test_functional.py
-rw-r--r-- | tests/test_functional.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/test_functional.py b/tests/test_functional.py index 1958a23d0..013efb91f 100644 --- a/tests/test_functional.py +++ b/tests/test_functional.py @@ -98,6 +98,10 @@ def get_tests(): TESTS = get_tests() TESTS_NAMES = [t.base for t in TESTS] +TEST_WITH_EXPECTED_DEPRECATION = [ + "future_unicode_literals", + "anomalous_unicode_escape_py3", +] @pytest.mark.parametrize("test_file", TESTS, ids=TESTS_NAMES) @@ -108,7 +112,11 @@ def test_functional(test_file): else testutils.LintModuleTest(test_file) ) LintTest.setUp() - LintTest._runTest() + if test_file.base in TEST_WITH_EXPECTED_DEPRECATION: + with pytest.deprecated_call(): + LintTest._runTest() + else: + LintTest._runTest() if __name__ == "__main__": |