summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>2023-02-23 12:48:06 +0100
committerGitHub <noreply@github.com>2023-02-23 12:48:06 +0100
commitd02d87d6f2fcdc01886a92732bebff2fb4cacb8f (patch)
treea0668bbac7d0f38e07f1858be7e76bf6c9cd8160 /tests
parentade4c68d86f30d58d35e3eaf4c530af780bbf7e2 (diff)
downloadastroid-git-d02d87d6f2fcdc01886a92732bebff2fb4cacb8f.tar.gz
Ignore ``DeprecationWarnings`` for a test that tests old behaviour (#2037)
Diffstat (limited to 'tests')
-rw-r--r--tests/testdata/python3/data/path_pkg_resources_1/package/__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/testdata/python3/data/path_pkg_resources_1/package/__init__.py b/tests/testdata/python3/data/path_pkg_resources_1/package/__init__.py
index b0d64337..f7bd5739 100644
--- a/tests/testdata/python3/data/path_pkg_resources_1/package/__init__.py
+++ b/tests/testdata/python3/data/path_pkg_resources_1/package/__init__.py
@@ -1 +1,5 @@
-__import__('pkg_resources').declare_namespace(__name__) \ No newline at end of file
+import warnings
+
+with warnings.catch_warnings():
+ warnings.simplefilter("ignore", DeprecationWarning)
+ __import__("pkg_resources").declare_namespace(__name__)