e9d25888092b517bb765ee7adbec05d4bb22561a
1. Stubs for some tests 2. tox.ini file with environments list
nose-timer
A timer plugin for nosetests that answers the question: how much time does every test takes?
Install
pip install nose-timer
Usage
Run nosetests with the --with-timer flag, and you will
see a list of the tests and the time spent by each one (in seconds):
myapp.tests.ABigTestCase.test_the_world_is_running: 56.0010s
myapp.tests.ABigTestCase.test_the_rest_of_the_galaxy_is_running: 2356.0010sHow do I show only the
n slowest tests?
For example, to show only the 10 slowest tests, run
nosetests with --timer-top-n flag.
How do I color the output and have pretty colors?
You can highlight slower tests using --timer-ok and
--timer-warning flags.
- Tests which takes less time than
--timer-okwill be highlighted green. - Tests which takes less time than
--timer-warningwill be highlighted yellow. - All other tests will be highlighted red.
How do I increase timer verbosity?
By default nose-timer outputs test times at the end of all tests. You
can output test times after each test with --timer-verbose
flag. Note that --vv should be enabled as well to view info
logs.
License
nose-timer is an MIT/BSD dual-Licensed library.
Contribute
- Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
- Fork the repository on GitHub to start making your changes to the master branch (or branch off of it).
- Write a test which shows that the bug was fixed or that the feature works as expected.
- Send a pull request and bug the maintainer until it gets merged and published.
- Make sure to add yourself to the author's file in
setup.pyand theContributorssection below :)
Contributors
Description
Languages
Python
100%