diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2023-05-01 21:48:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-01 21:48:06 +0200 |
commit | 9e103147c986a098181564b606a5fc95697df2c1 (patch) | |
tree | 947a17ff92410b67cf624fa53f96294550bdf53a /tests | |
parent | faea71172f0a13482d23861de0c53cf101b0d108 (diff) | |
download | astroid-git-9e103147c986a098181564b606a5fc95697df2c1.tar.gz |
Fix urllib3 tests following the release of v2.0.0 (#2162)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_modutils.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_modutils.py b/tests/test_modutils.py index be99bdb1..9dcdc811 100644 --- a/tests/test_modutils.py +++ b/tests/test_modutils.py @@ -28,9 +28,9 @@ from . import resources try: import urllib3 # type: ignore[import] # pylint: disable=unused-import - HAS_URLLIB3 = True + HAS_URLLIB3_V1 = urllib3.__version__.startswith("1") except ImportError: - HAS_URLLIB3 = False + HAS_URLLIB3_V1 = False def _get_file_from_object(obj) -> str: @@ -547,8 +547,9 @@ class ExtensionPackageWhitelistTest(unittest.TestCase): ) -@pytest.mark.skipif(not HAS_URLLIB3, reason="This test requires urllib3.") +@pytest.mark.skipif(not HAS_URLLIB3_V1, reason="This test requires urllib3 < 2.") def test_file_info_from_modpath__SixMetaPathImporter() -> None: + """Six is not backported anymore in urllib3 v2.0.0+""" assert modutils.file_info_from_modpath(["urllib3.packages.six.moves.http_client"]) |