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.
Hey, I get it. Sometimes we write tests, but we don't actually want to wait
for them to finish executing. Whether they're slow tests, they need some
dependencies you don't have, or they aren't related to the work you
do, there's some tests that just weren't meant to be run by devs in the age
of CI/CD platforms. That's where pytest-explicit
comes in.
This plugin allows developers to specify test markers that should be ignored
by default when running pytest
, but also quickly bypass this behaviour
for CI/CD. Just add a --run-all
flag to your pytest command for your test
pipeline, and this plugin won't skip anything!
If all you want to do is skip slow tests by default, you can stop reading
now. Out-of-the-box, pytest-explicit
will make any test marked slow
require you to pass the --run-slow
(or --run-all
) for them to take
up precious developer time.
Need more ignored tests? Just add the explicit-only
option to your
pytest config file, and pytest-explicit
will pick up the markers
specified and dynamically add --run-<marker>
CLI options to pytest. Here's
a sample setup.cfg
file below!
[tool:pytest]
markers =
slow: Marks a slow test
memory_intensive: Marks a test that needs at least 16 gb RAM to run
smoke: Marks a test that gives early alert to the health of the app
testpaths = tests
explicit-only =
slow
memory_intensive
With this configuration file, any test marked with either slow
or
memory_intensive
won't run unless the appropriate CLI flags are passed!
FAQs
A Pytest plugin to ignore certain marked tests by default
We found that pytest-explicit 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.
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.