Skip to content

Commit

Permalink
Correctly display error when running setup.py test.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
anntzer committed Mar 19, 2018
1 parent 6169fa2 commit d0f09cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@


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


class BuildExtraLibraries(BuildExtCommand):
Expand Down

0 comments on commit d0f09cd

Please sign in to comment.