pytest-profiling: option to include setup/teardown into the output
See original GitHub issuepytest-profiling
outputs profiles of individual tests and a combined profile of all tests
It seems that setup/teardown is not included in the profile.
I wish there was an option to profile everything, including setup, teardown and fixtures…
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
pytest-profiling - PyPI
Profiling plugin for pytest, with tabular and heat graph output. Tests are profiled with cProfile and analysed with pstats; heat graphs are generated...
Read more >pytest fixtures: explicit, modular, scalable
pytest fixtures offer dramatic improvements over the classic xUnit style of setup/teardown functions: fixtures have explicit names and are activated by ...
Read more >How do I correctly setup and teardown for my pytest class with ...
According to Fixture finalization / executing teardown code, the current best practice for setup and teardown is to use yield instead of return...
Read more >Profiling and improving the runtime of a large pytest test suite
Database setup and tear down. The final optimization I applied had to do with the way we use databases in the test suite....
Read more >pytest-profiling - Python Package Health Analysis - Snyk
Profiling plugin for py.test For more information about how to use this package see ... Snyk scans all the packages in your projects...
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 FreeTop 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
Top GitHub Comments
@benjaminrigaud Hi there (sorry for the super slow reply!!) The way I’d do this is implement both new and old version of the fix in #94 - as well as add a cmdline switch to control which version to use. So if say
--no-profile-fixtures
is passed in, then the code inpytest_runtest_protocol
is a no-op.Hi, There is any option to make this fix configurable. I have a situation which i want to profile just the test, without the fixture code itself.
More details: I’m using pypy, so a normal profiling wont be good, pypy requires warmup to detect the hot spots on the code and jit them. I’m using pytest-profiling and pytest-benchmark together, the benchmark plugin have a warmup option and i’m looking for something similar here.
I can implement this on my code (the warmup/setup section) but i need an option to not profile all the pytest code which my test cause to run, and profile just the test itself.
Thank you.