Skip to content

Commit 11eba03

Browse files
Add a regression test for pylint #73
Following change in the way distutil is stored in setuptools See pylint-dev/astroid#1321
1 parent 7d03942 commit 11eba03

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""
2+
Regression test to check that distutils can be imported
3+
See https://github.com/PyCQA/pylint/issues/73
4+
5+
See also:
6+
https://github.com/PyCQA/pylint/issues/2955
7+
https://github.com/PyCQA/astroid/pull/1321
8+
"""
9+
10+
# pylint: disable=unused-import
11+
12+
import distutils.version
13+
from distutils.util import strtobool
14+
from distutils import doesnottexists # [no-name-in-module]
15+
from distutils.doesnottexists import nope # [no-name-in-module, import-error]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
no-name-in-module:14:0:14:36::No name 'doesnottexists' in module 'distutils':UNDEFINED
2+
import-error:15:0:15:41::Unable to import 'distutils.doesnottexists':UNDEFINED
3+
no-name-in-module:15:0:15:41::No name 'doesnottexists' in module 'distutils':UNDEFINED

0 commit comments

Comments
 (0)