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

Directories passed to pytest-watch are also passed to pytest, but shouldn't be #130

Open
adibsaad opened this issue Dec 20, 2022 · 0 comments

Comments

@adibsaad
Copy link

When I run this command

python -m pytest_watch src/

I expect pytest-watch to run pytest without any additional args and for pytest-watch to watch the src/ directory. Instead, what happens is pytest-watch correctly only watches for changes in src/ but it runs the command py.test src/, making pytest only look for tests in src/, but it should just be running pytest without additional args.

Output from above command

+ python -m pytest_watch src/

[Tue Dec 20 18:49:33 2022] Running: py.test src/
============================================================================ test session starts ============================================================================
platform linux -- Python 3.7.13, pytest-7.1.3, pluggy-1.0.0
rootdir: [removed], configfile: pytest.ini
plugins: anyio-3.6.2, requests-mock-1.10.0, Faker-15.3.4
collected 0 items                                                                                                                                                           

=========================================================================== no tests ran in 0.04s ===========================================================================

This also happens when you pass additional pytest args, it just gets concatenated

+ python -m pytest_watch src/ -- tests/

[Tue Dec 20 18:52:09 2022] Running: py.test src/ tests/
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

No branches or pull requests

1 participant