Skip to content
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

Pytest doesn't add PYTHONPATH itself #3341

Closed
myusko opened this issue Mar 24, 2018 · 4 comments
Closed

Pytest doesn't add PYTHONPATH itself #3341

myusko opened this issue Mar 24, 2018 · 4 comments
Labels
type: question general question, might be closed after 2 weeks of inactivity

Comments

@myusko
Copy link

myusko commented Mar 24, 2018

Hello, and thank you for the cool tool! but I noticed that, when I tried to run tests via pytest command.

I'm always got the E ModuleNotFoundError: in order to fix the issue, we need to run python -m pytest manually, or just export PYTHONPATH to root directory.

Will be cool, if Pytest will do it itself, thank you;)

@pytestbot
Copy link
Contributor

GitMate.io thinks possibly related issues are #532 (pytest -f does not notice new tests), #2196 (Pytest on cygwin doesn't find files), #1026 (pytest.warn doesn't appear to be working for deprecation warnings), #3312 (pytest.approx doesn't support comparison between arrays and scalars), and #1037 (pytest.deprecated_call doesn't catch PendingDeprecationWarnings).

@pytestbot pytestbot added the platform: mac mac platform-specific problem label Mar 24, 2018
@RonnyPfannschmidt
Copy link
Member

RonnyPfannschmidt commented Mar 25, 2018

this is expected and planned behaviour, actually it came to attention that module execution is a problematic way to run things

if we always add the worktree we completely ruin sanely testing packages that where installed with tests from the worktree

@RonnyPfannschmidt RonnyPfannschmidt added the type: question general question, might be closed after 2 weeks of inactivity label Mar 25, 2018
@myusko
Copy link
Author

myusko commented Mar 25, 2018

@RonnyPfannschmidt Got it, thank you for the clear explanation

@nicoddemus nicoddemus removed the platform: mac mac platform-specific problem label Mar 26, 2018
@nicoddemus
Copy link
Member

Closing this for now then. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question general question, might be closed after 2 weeks of inactivity
Projects
None yet
Development

No branches or pull requests

4 participants