
Product
Secure Your AI-Generated Code with Socket MCP
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
Porting of nose-timer plugin for pytest. A timer plugin for pytest (how much time does every test take?).
To install the latest release from PyPI:
pip install pytest-timer
To install pytest-timer
with termcolor
for colored durations:
pip install pytest-timer[termcolor]
To install pytest-timer
with colorama
for colored durations:
pip install pytest-timer[colorama]
Or to install the latest development version from Git:
pip install git+git://github.com/skudriashev/pytest-timer.git
Or to install the latest from source:
git clone https://github.com/skudriashev/pytest-timer.git
cd pytest-timer
pip install .
You can also make a developer install if you plan on modifying the source frequently:
pip install -e .
After installing pytest-timer
plugin the following report will be added:
========================== pytest-timer ==========================
[success] tests/test_plugin.py::TestPlugin::test_loaded2: 0.0002s
[success] tests/test_plugin.py::TestPlugin::test_loaded: 0.0002s
n
slowest tests?For example, to show only the 10 slowest tests, run pytest with the --timer-top-n
flag:
pytest --with-timer --timer-top-n 10
In some cases, you may want to disable colors completely. This is done by using the --timer-no-color
flag.
This is useful when running tests in a headless console.
It is possible to filter results by color. To do so, you can use the --timer-filter
flag:
pytest --with-timer --timer-filter ok
pytest --with-timer --timer-filter warning
pytest --with-timer --timer-filter error
Or to apply several filters at once:
pytest --with-timer --timer-filter warning,error
pytest-timer
is MIT Licensed library.
FAQs
A timer plugin for pytest
We found that pytest-timer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.