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

Make it easier to spot when slow tests are added #729

Open
coretl opened this issue Jan 10, 2025 · 0 comments
Open

Make it easier to spot when slow tests are added #729

coretl opened this issue Jan 10, 2025 · 0 comments
Labels
good first issue Good for newcomers

Comments

@coretl
Copy link
Collaborator

coretl commented Jan 10, 2025

We should make sure that all new tests are relatively fast, with a few smoke tests that are allowed to take a bit longer. I suggest a default per-test timeout of 0.5s, with an override for the few tests that take longer than this.

This would involve:

  • Adding pytest-timeout as a dev dependency in pyproject.toml
  • Setting in timeout = 0.5 in [tool.pytest.ini_options] in pyproject.toml
  • Adding @pytest.mark.timeout(<a_longer_timeout>) for those tests that now start to fail

As per https://pypi.org/project/pytest-timeout/

In a later PR we will make the slow tests faster

@coretl coretl added the good first issue Good for newcomers label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant