-
Notifications
You must be signed in to change notification settings - Fork 11
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
Higher test latency than pytest-watch #15
Comments
@andreoliwa, could you provide any additional context to help troubleshoot this latency? |
There is a You can use it like this: ptw --delay 0.1 . |
@brylie-wolt Does the provided information resolve your issue? Btw, the reason why this delay exists in the first place, is because oftentimes one can have linters / code formatters configured that run after the actual file save happens |
I'll look into the advice you provided to see if it can resolve the issue, as it's not something I've encountered firsthand. I opened this issue when investigating the slowness reported by a colleague. Your explanation of the delay was helpful and informative. Just so you know, we're using pre-commit for linters and other tools. |
@brylie-wolt FYI |
Sorry about not replying earlier. I will try the latest version. |
@olzhasar the latest version works better with the new shorter default for the delay. The latency problem I had before is due to a different behaviour in pytest-watcher. I realise now that it's an intentional behaviour: #1 As described in the issue, I need to change something in the code to trigger tests. |
@andreoliwa @brylie-wolt Do you guys think that auto-run is a better default behavior? I am personally used to the current way of things, but I don't have a strong preference here |
I don't have a strong opinion, but default behavior shouldn't surprise people. So, consider user expectations when adding default behavior. Developers expect tests to run without delay since delays slow the development process and increase CI costs. |
@brylie-wolt I'm talking about running tests on startup, not the delay. |
Not really, I also don't have a strong opinion here. It might be worthy to add something to the README, to manage expectations.
When I first saw the project, I thought it was a drop-in replacement for pytest-watch. |
@andreoliwa good points, thank you! |
@andreoliwa Updated the README file accordingly. |
Thank you for the prompt responses. 🙏🏻 The README looks great. I also like the new verbose logging from v0.3.2: pytest-watcher version 0.3.2
Runner command: pytest --testmon
Waiting for file changes in /Users/(...)
[ptw] /Users/(...).py modified I'll switch my repos to use pytest-watcher and you got my star. 🌟 😄 |
@andreoliwa Thank you! Appreciate your feedback! |
We are migrating from
pytest-watch
topytest-watcher
and noticed considerable latency when making code changes.How could the test latency be reduced?
The text was updated successfully, but these errors were encountered: