Skip to content

Conversation

@xuhdev
Copy link
Contributor

@xuhdev xuhdev commented Jan 28, 2020

Directly calling "pytest" sometimes breaks tests on "pypy", such as #234, because the actual current code is untested. As explained from pypy website https://docs.pytest.org/en/latest/usage.html:

["python -m pytest"] is almost equivalent to invoking the command line
script pytest [...] directly, except that calling via python will also
add the current directory to sys.path.

Note that, unlike the tests for pypy, the pytest script is not directly invoked in tests for other Python interpreters.

Directly calling "pytest" sometimes breaks tests on "pypy", such as pypa#234, because the actual current code is untested.

As explained from pypy website <https://docs.pytest.org/en/latest/usage.html>:

> ["python -m pytest"] is almost equivalent to invoking the command line
> script pytest [...] directly, except that calling via python will also
> add the current directory to sys.path.

Note that, unlike tests for pypy, the pytest script is not directly invoked in tests for other
Python interpreters.
@brettcannon brettcannon requested a review from pradyunsg January 28, 2020 21:41
@pradyunsg pradyunsg merged commit ed9c96c into pypa:master Jan 29, 2020
@xuhdev xuhdev deleted the pytest branch January 29, 2020 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants