Open sbellem opened 4 years ago
Merging #451 into dev will increase coverage by
0.07129%
. The diff coverage isn/a
.
@@ Coverage Diff @@
## dev #451 +/- ##
===================================================
+ Coverage 77.02727% 77.09856% +0.07129%
===================================================
Files 50 50
Lines 5611 5611
Branches 859 859
===================================================
+ Hits 4322 4326 +4
+ Misses 1113 1111 -2
+ Partials 176 174 -2
The benchmark tests are run only once without reports.
Besides using the command line option
--benchmark-disable
to run the tests only once, a custom marker is used to select only one parameter value or tuple (apytest
param
object) for test functions that are parameterized. The marker is namedskip_bench
for now :smile:. Here's an example of how this works:The above test can then be run in three different ways:
pytest -m skip_bench ...
- only tests that are marked withskip_bench
will be run;pytest -m "no skip_bench" ...
- tests that are marked withskip_bench
will be skipped, andpytest ...
- (no marker is used) all tests will be run.When the goal is to benchmark all, there's no need to know about this marker, and option 3 above will do. The main purpose is really for cases such as on Travis CI, in which one wishes to quickly check whether the tests run for a "subsample" of the parameters. Option 2, is not really useful, and is just a consequence of how the
marker
mechanism works.If someone has a better idea for the name of the marker please say as I don't particularly like the name!
See the
benchmark/README.md
for more explanations.Tiny issues were also fixed:
use_fft
was replaced withuse_omega_powers
intest_benchmark_reed_solomon.py
setup=
keyword argumentbenchmark.pedantic()
is used instead ofbenchmark()
intests/fixtures.py