Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Linux-only Pytest plugin to control durations of various test case execution phases
Linux-only Pytest plugin to control durations of various test case execution phases.
For documentation visit pytest-timeouts.readthedocs.io.
This plugin has been designed for specific use cases which are out of the scope of famous pytest-timeout
plugin.
It uses a SIGALRM
signal to schedule a timer which breaks the test case.
setup
, execution
and teardown
phase timeouts controllable by:
--setup-timeout
, --execution-timeout
and --teardown-timeout
setup_timeout
, execution_timeout
and teardown_timeout
setup_timeout
, execution_timeout
and teardown_timeout
--timeouts-order
--timeouts-order
allow change order of override timeout settings, and disable some settings, i.e. --timeout-order i
disable markers and opts, any combination is allowpip install pytest-timeouts
pip install git+https://github.com/Scony/pytest-timeouts.git
pytest --setup-timeout 2.5 --execution-timeout 2.01 --teardown-timeout 0
pytest.ini
setting[pytest]
setup_timeout = 2.5
execution_timeout = 2.01
teardown_timeout = 0
import time
import pytest
@pytest.mark.setup_timeout(0.3)
@pytest.mark.execution_timeout(0.5)
@pytest.mark.teardown_timeout(0.4)
def test_timeout():
time.sleep(1)
FAQs
Linux-only Pytest plugin to control durations of various test case execution phases
We found that pytest-timeouts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.