
Research
Malicious fezbox npm Package Steals Browser Passwords from Cookies via Innovative QR Code Steganographic Technique
A malicious package uses a QR code as steganography in an innovative technique.
pytest-regtest
Advanced tools
The full documentation for this package are available at https://pytest-regtest.readthedocs.org
pytest-regtest
is a plugin for pytest to implement
regression testing.
Unlike functional testing, regression testing does not test whether the software produces the correct results, but whether it behaves as it did before changes were introduced.
More specifically, pytest-regtest
provides snapshot testing, which
implements regression testing by recording data within a test function
and comparing this recorded output to a previously recorded reference
output.
To install and activate this plugin execute:
$ pip install pytest-regtest
!!! note
`pytest-regtest` provides some functionality specific to `NumPy`,
`pandas`, and `polars`. These dependencies are not installed when
you install `pytest-regtest`. For example, if you are using NumPy
snapshots, we assume that your production code (the code under
test) uses NumPy and therefore should be part of your project's
setup.
If you're working with code that has little or no unit testing, you can use regression testing to ensure that your changes don't break or alter previous results.
Example: This can be useful when working with data analysis scripts, which often start as one long script and then are restructured into different functions as they evolve.
If a unit tests contains many assert
statements to check a complex
data structure you can use regression tests instead.
Example: To test code which ingests data into a database one can use regression tests on textual database dumps.
If your code generates numerical results, such as NumPy
arrays,
pandas
or polars
data frames, you can use pytest-regtest
to simply record such
results and test them later, taking into account relative and absolute
tolerances.
Example: A function creates a 10 x 10 matrix. Either you have to write 100 assert statements or you use summary statistics to test your result. In both cases, you may get little debugging information if a test fails.
FAQs
pytest plugin for snapshot regression testing
We found that pytest-regtest 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
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.
Application Security
/Research
/Security News
Socket detected multiple compromised CrowdStrike npm packages, continuing the "Shai-Hulud" supply chain attack that has now impacted nearly 500 packages.