Make generated doc in simple.rst more reliable
Sometimes `test_funcfast` would show up in the `setup` step in the slowest test durations summary.
This commit is contained in:
parent
523bfa6151
commit
8b322afcdb
|
@ -363,14 +363,14 @@ out which tests are the slowest. Let's make an artificial test suite:
|
|||
import time
|
||||
|
||||
def test_funcfast():
|
||||
pass
|
||||
|
||||
def test_funcslow1():
|
||||
time.sleep(0.1)
|
||||
|
||||
def test_funcslow2():
|
||||
def test_funcslow1():
|
||||
time.sleep(0.2)
|
||||
|
||||
def test_funcslow2():
|
||||
time.sleep(0.3)
|
||||
|
||||
Now we can profile which test functions execute the slowest::
|
||||
|
||||
$ pytest --durations=3
|
||||
|
|
Loading…
Reference in New Issue