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

speed up tests massively by specifying location #5475

Merged
merged 4 commits into from
Nov 12, 2019

Conversation

danlipert
Copy link
Contributor

@danlipert danlipert commented Nov 11, 2019

Description

This PR specifies in the pytest configuration where the tests are located. While this does add some additional coupling in that devs will need to add their tests to this file when creating a new module, or adding tests to a nonstandard path, it speeds up running the tests massively.

168.28s vs 506.17s on my local

This PR also pins a dependency that caused an issue with PyTest 4

Refers/Fixes

n/a

Testing

Tested locally and with Docker

@danlipert danlipert marked this pull request as ready for review November 11, 2019 15:00
@codecov
Copy link

codecov bot commented Nov 11, 2019

Codecov Report

Merging #5475 into master will decrease coverage by 0.48%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5475      +/-   ##
==========================================
- Coverage   29.61%   29.12%   -0.49%     
==========================================
  Files         242      242              
  Lines       20849    20849              
  Branches     3016     3016              
==========================================
- Hits         6174     6072     -102     
- Misses      14423    14529     +106     
+ Partials      252      248       -4
Impacted Files Coverage Δ
app/kudos/test_views.py 0% <0%> (-100%) ⬇️
app/kudos/test_models.py 0% <0%> (-100%) ⬇️
app/kudos/test_utils.py 0% <0%> (-70.59%) ⬇️
app/app/context.py 0% <0%> (-48.15%) ⬇️
app/retail/helpers.py 28.57% <0%> (-42.86%) ⬇️
app/retail/templatetags/matches.py 62.5% <0%> (-37.5%) ⬇️
app/retail/templatetags/is_in_list.py 66.66% <0%> (-33.34%) ⬇️
app/kudos/views.py 15.63% <0%> (-6.47%) ⬇️
app/kudos/models.py 52.44% <0%> (-0.7%) ⬇️
app/dashboard/views.py 12.7% <0%> (ø) ⬆️
... and 1 more

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 7d502d5...aaa4824. Read the comment docs.

@thelostone-mc thelostone-mc merged commit 6f72a8e into master Nov 12, 2019
@thelostone-mc thelostone-mc deleted the specify-test-paths branch June 27, 2020 00:45
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.

2 participants