8000 Correctly display error when running setup.py test. · matplotlib/matplotlib@d0f09cd · GitHub
[go: up one dir, main page]

Skip to content

Commit d0f09cd

Browse files
committed
Correctly display error when running setup.py test.
We display an error if someone tries to run setup.py test (saying that one should run tests.py instead), but that doesn't get displayed if test.local_freetype is set in setup.cfg -- because the test command considers that equivalent to passing a (non-existent) local_freetype option to it, and fails first during argument parsing. As a solution, display the error in the constructor of the command instead.
1 parent 6169fa2 commit d0f09cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@
125125

126126

127127
class NoopTestCommand(TestCommand):
128-
def run(self):
128+
def __init__(self, dist):
129129
print("Matplotlib does not support running tests with "
130-
"'python setup.py test'. Please run 'python tests.py'")
130+
"'python setup.py test'. Please run 'python tests.py'.")
131131

132132

133133
class BuildExtraLibraries(BuildExtCommand):

0 commit comments

Comments
 (0)
0