Improve performance of ~3 of the slowest tests#4090
Improve performance of ~3 of the slowest tests#4090asottile merged 3 commits intopytest-dev:masterfrom asottile:faster_tests
Conversation
I don't recall why, and looking at the test itself no clear reason jumps to me... if things are passing, I say let's keep your changes. 😁 |
testing/code/test_excinfo.py
Outdated
| return a(numpy_like()) | ||
|
|
||
| try: | ||
| with pytest.raises(RecursionError) as excinfo: |
There was a problem hiding this comment.
RecursionError is py35+ (or py36+) only; IIRC you need to use RuntimeError instead.
There was a problem hiding this comment.
dang, I always forget this 😭
Codecov Report
@@ Coverage Diff @@
## master #4090 +/- ##
=========================================
- Coverage 94.47% 94.4% -0.08%
=========================================
Files 109 109
Lines 23813 23811 -2
Branches 2349 2349
=========================================
- Hits 22498 22478 -20
- Misses 1007 1021 +14
- Partials 308 312 +4
Continue to review full report at Codecov.
|
|
Noice! 👍 |
RonnyPfannschmidt
left a comment
There was a problem hiding this comment.
fabulous enhancements 👍
cherry picked a few from
pytest testing/{subdir} --durations=5and wanted to see what I could do to make them faster.this saves ~11 seconds off of a test run (which isn't much but it's something!)
interesting to note that
runpytest_subprocessadds about 500ms per invocation. (I guess we should avoid it if possible? @nicoddemus do you know if there's a reason why it was used for #3124?)