Package for timing your tests.
Project description
testopwatch
Check how long each test takes and what test file is the slowest
❯ python manage.py test
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
time_exec: 0.2517799s test_name: test_create_account (account.tests.test_account.AccountTests) OK
time_exec: 0.1164200s test_name: test_login (account.tests.test_account.AccountTests) OK
time_exec: 0.1113484s test_name: test_ping (account.tests.test_account.AccountTests) OK
time_exec: 0.0778311s test_name: test_activate (account.tests.test_account.AccountTests) OK
time_exec: 0.2358941s test_name: test_email_user (account.tests.test_account.AccountTests) OK
...
----------- Total test class times -----------
TestClass (account.tests.test_account.AccountTests) finished in 1.24016s
...
Instructions:
-
Install
❯ pip install testopwatch
-
in your settings.py add the following
TIME_RUNNER = "testopwatch.DjangoTimeRunner"
-
run your test with the built-in manager
❯ python manage.py test --failfast --parallel
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
testopwatch-0.1.0.tar.gz
(3.6 kB
view hashes)
Built Distribution
Close
Hashes for testopwatch-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 435663ffe1c6068ccc2deb568cf5c56dbc8afc9c9d587072afc17e409ef8cfe8 |
|
MD5 | a66d3e0c6b3b23cf7f1d5e558f2c3960 |
|
BLAKE2b-256 | 81ddafb7c3168f9832a31140afa3d8424fd84d822b4b4e256e76d54e2825a279 |