
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
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.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.