Skip to content

Commit

Permalink
Fix tests on Python 3.12
Browse files Browse the repository at this point in the history
distutils is no longer part of the standard library, so it's no longer
deemed safe. Let's make the test not depend on that.
  • Loading branch information
fsouza committed Oct 3, 2023
1 parent c288e28 commit 2a3c23a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test_autoflake.py
Expand Up @@ -928,6 +928,7 @@ def test_fix_code_with_from_and_depth_module(self) -> None:
from distutils.version import LooseVersion, StrictVersion
StrictVersion('1.0.0')
""",
remove_all_unused_imports=True,
),
)

Expand All @@ -941,6 +942,7 @@ def test_fix_code_with_from_and_depth_module(self) -> None:
from distutils.version import LooseVersion, StrictVersion as version
version('1.0.0')
""",
remove_all_unused_imports=True,
),
)

Expand Down

0 comments on commit 2a3c23a

Please sign in to comment.