Skip to content

Commit

Permalink
Temporarily disable distutils test
Browse files Browse the repository at this point in the history
With v60.0.0 setuptools started monkeypatching the distuils module
to use their own vendored version. Longterm any uses of distuils
should be replaced or removed.

pypa/setuptools#2896
  • Loading branch information
cdce8p committed Dec 27, 2021
1 parent a47089b commit 04ba930
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/unittest_modutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
from xml import etree
from xml.etree import ElementTree

import pytest

import astroid
from astroid import modutils
from astroid.interpreter._import import spec
Expand Down Expand Up @@ -72,6 +74,13 @@ def test_find_egg_module(self) -> None:
["data", "MyPyPa-0.1.0-py2.5.egg", self.package],
)

# TODO: Fix when removing distutils dependency
# https://github.com/pypa/setuptools/pull/2896
@pytest.mark.xfail(
sys.version_info > (3, 7),
sys.version_info < (3, 11),
reason="setuptools v60.0.0 starts using local copy of distutils",
)
def test_find_distutils_submodules_in_virtualenv(self) -> None:
found_spec = spec.find_spec(["distutils", "version"])
self.assertEqual(found_spec.location, distutils.version.__file__)
Expand Down

0 comments on commit 04ba930

Please sign in to comment.