-
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rely on pytest_perf 0.9 and the new Python syntax.
- Loading branch information
Showing
3 changed files
with
33 additions
and
19 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from pytest_perf.deco import extras | ||
|
||
|
||
@extras('perf') | ||
def discovery_perf(): | ||
"discovery" | ||
import importlib_metadata # end warmup | ||
importlib_metadata.distribution('ipython') | ||
|
||
|
||
def entry_points_perf(): | ||
"entry_points()" | ||
import importlib_metadata # end warmup | ||
importlib_metadata.entry_points() | ||
|
||
|
||
@extras('perf') | ||
def cached_distribution_perf(): | ||
"cached distribution" | ||
import importlib_metadata | ||
importlib_metadata.distribution('ipython') # end warmup | ||
importlib_metadata.distribution('ipython') | ||
|
||
|
||
@extras('perf') | ||
def uncached_distribution_perf(): | ||
"uncached distribution" | ||
import importlib | ||
import importlib_metadata | ||
# end warmup | ||
importlib.invalidate_caches() | ||
importlib_metadata.distribution('ipython') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,7 +51,7 @@ testing = | |
pep517 | ||
pyfakefs | ||
flufl.flake8 | ||
pytest-perf >= 0.6.2 | ||
pytest-perf >= 0.9 | ||
|
||
docs = | ||
# upstream | ||
|