8000 updates error message to run pytest instead of tests.py standalone by eseiver · Pull Request #11808 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

updates error message to run pytest instead of tests.py standalone #11808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 5, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
class NoopTestCommand(TestCommand):
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 'pytest'.")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the docs you can run the tests with py.test or python tests.py.
Should the latter not be the case, one would need to update the docs as well. Else, the error could probably read

Please run 'python tests.py' or 'py.test'.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe there was an attempt to migrate to py.test, and to deprecate disincentive python tests.py, in particular the documentation does not mention how to run a single test using python tests.py. So it seem to me that directly giving the right invocation.

If you look at previous PRs and comment (like https://github.com/matplotlib/matplotlib/pull/8026/files#r101600628), there seem to be some consensus that pytest is prefered and should replace python tests.py where possible.

Also

In [1]: import this
...
There should be one-- and preferably only one --obvious way to do it.
...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Carreau all of the pytest CLI args pass through.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ll of the pytest CLI args pass through.

Oh, ok, well the old doc was not saying that, and giving innacurate information.
Thanks for merging. I think that having pytest everywhere but still have the python tests.py as a alias is great !



class BuildExtraLibraries(BuildExtCommand):
Expand Down
0