Allowing --benchmark-skip and --benchmark-only
See original GitHub issueWhat do you think about allowing both --benchmark-skip
and --benchmark-only
and giving the latter precedence? That’d mean one could have --benchmark-skip
in pytest.ini
in order to never run benchmarks on normal testruns, and add --benchmark-only
on the commandline for benchmark runs.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Usage — pytest-benchmark 4.0.0 documentation
A better way is to just benchmark the final function: ... Skip running any tests that contain benchmarks. ... --benchmark-enable.
Read more >pytest-benchmark - Read the Docs
--benchmark-disable Disable benchmarks. Benchmarked functions are only ran once and no stats are reported.
Read more >Enabling or disabling the Benchmark Test and Reading Level ...
Changing test enablement settings means that you can enable or disable the Benchmark Test or Reading Level Assessment for all test...
Read more >Benchmarks - Practical Go Lessons
The benchmark will not just run the function one time but several time to gather ... This flag allows you to control your...
Read more >Frequently Asked Questions - Criterion.rs Documentation
The other option is to move those non-benchmark files to a subdirectory (eg. benches/benchmark_code ) where they will no longer be detected as...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think tests and benchmarks should be separated. Can’t think of a situation when I want to run both tests and benchmarks in a single call. This is being the default behavior puzzles me.
Uh … so I’ve checked the code,
--benchmark-enable
overrides--benchmark-disable
since b181664c407b4c30354baaa89fde76057bdb71d1.Can we just close this and leave it at that?