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

Mark tests slower than 1.5 seconds #1633

Merged
merged 5 commits into from
Sep 9, 2021
Merged

Mark tests slower than 1.5 seconds #1633

merged 5 commits into from
Sep 9, 2021

Conversation

albi3ro
Copy link
Contributor

@albi3ro albi3ro commented Sep 8, 2021

This PR marks the 35 or so slowest tests that took longer than 1.5 seconds on my computer as "slow".

You can locally run all not slow tests via the command:

pytest -m "not slow" files_to_check

This will hopefully make the local execution of the test suite easier.

I also added the pytest.ini file to register the "slow" mark.

In the future, slow tests that get added should be marked via @pytest.mark.slow.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2021

Hello. You may have forgotten to update the changelog!
Please edit .github/CHANGELOG.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

@albi3ro albi3ro requested a review from rmoyard September 8, 2021 16:16
@codecov
Copy link

codecov bot commented Sep 8, 2021

Codecov Report

Merging #1633 (6c662c6) into master (02c264d) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1633   +/-   ##
=======================================
  Coverage   99.14%   99.14%           
=======================================
  Files         196      196           
  Lines       14241    14241           
=======================================
  Hits        14119    14119           
  Misses        122      122           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 02c264d...6c662c6. Read the comment docs.

Copy link
Contributor

@rmoyard rmoyard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition, I didn't know we could mark the tests 👍 I've tested it and it works well on my side. Just a small comment for the changelog. 💯

.github/CHANGELOG.md Outdated Show resolved Hide resolved
@@ -0,0 +1,3 @@
[pytest]
markers =
slow: marks tests as slow (deselect with '-m "not slow"')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great ! 💯

@albi3ro albi3ro requested a review from rmoyard September 9, 2021 09:30
@albi3ro albi3ro merged commit e702624 into master Sep 9, 2021
@albi3ro albi3ro deleted the mark-slow-tests branch September 9, 2021 13:39
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.

None yet

2 participants