
Research
npm Malware Targets Telegram Bot Developers with Persistent SSH Backdoors
Malicious npm packages posing as Telegram bot libraries install SSH backdoors and exfiltrate data from Linux developer machines.
.. Badges have empty alts. So nothing shows up if they do not work. .. This fixes readthedocs issues with badges. .. image:: https://img.shields.io/pypi/v/pytest-workflow.svg :target: https://pypi.org/project/pytest-workflow/ :alt:
.. image:: https://img.shields.io/conda/v/conda-forge/pytest-workflow.svg :target: https://anaconda.org/conda-forge/pytest-workflow :alt:
.. image:: https://img.shields.io/pypi/pyversions/pytest-workflow.svg :target: https://pypi.org/project/pytest-workflow/ :alt:
.. image:: https://img.shields.io/pypi/l/pytest-workflow.svg :target: https://github.com/LUMC/pytest-workflow/blob/master/LICENSE :alt:
.. image:: https://travis-ci.org/LUMC/pytest-workflow.svg?branch=develop :target: https://travis-ci.org/LUMC/pytest-workflow :alt:
.. image:: https://codecov.io/gh/LUMC/pytest-workflow/branch/develop/graph/badge.svg :target: https://codecov.io/gh/LUMC/pytest-workflow :alt:
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3757727.svg :target: https://doi.org/10.5281/zenodo.3757727 :alt: More information on how to cite pytest-workflow here.
pytest-workflow is a workflow-system agnostic testing framework that aims to make pipeline/workflow testing easy by using YAML files for the test configuration. Whether you write your pipelines in WDL, snakemake, nextflow, bash or any other workflow framework, pytest-workflow makes testing easy. pytest-workflow is build on top of the pytest test framework.
For our complete documentation and examples checkout our
readthedocs page <https://pytest-workflow.readthedocs.io/>
_.
Pytest-workflow requires Python 3.7 or higher. It is tested on Python 3.7, 3.8, 3.9, 3.10 and 3.11.
pip install pytest-workflow
tests
directory in the root of your repository.tests
directory.Pytest-workflow is also available as a conda package on conda-forge <https://anaconda.org/conda-forge/pytest-workflow>
. Follow
these instructions <http://conda-forge.org/docs/user/introduction.html#how-can-i-install-packages-from-conda-forge>
to set up channels properly in order to use conda-forge. Alternatively,
you can set up the channels correctly for use with bioconda <https://bioconda.github.io/index.html#set-up-channels>
_. After that conda install pytest-workflow
can be used to install pytest-workflow.
Run pytest
from an environment with pytest-workflow installed.
Pytest will automatically gather files in the tests
directory starting with
test
and ending in .yaml
or .yml
.
To check the progress of a workflow while it is running you can use tail -f
on the stdout
or stderr
file of the workflow. The locations of these
files are reported in the log as soon as a workflow is started.
For debugging pipelines using the --kwd
or --keep-workflow-wd
flag is
recommended. This will keep the workflow directory and logs after the test run
so it is possible to check where the pipeline crashed. The -v
flag can come
in handy as well as it gives a complete overview of succeeded and failed tests.
Below is an example of a YAML file that defines a test:
.. code-block:: yaml
This will run touch test.file
and check afterwards if a file with path:
test.file
is present. It will also check if the command
has exited
with exit code 0
, which is the only default test that is run. Testing
workflows that exit with another exit code is also possible. Several other
predefined tests as well as custom tests are possible.
.. code-block:: yaml
name: moo file # The name of the workflow (required) command: bash moo_workflow.sh # The command to execute the workflow (required) files: # A list of files to check (optional)
name: simple echo # A second workflow. Notice the starting -
which means
command: "echo moo" # that workflow items are in a list. You can add as much workflows as you want
files:
name: mission impossible # Also failing workflows can be tested tags: # A list of tags that can be used to select which test
--tag
flag.
command: bash impossible.sh
exit_code: 2 # What the exit code should be (optional, if not given defaults to 0)
files:name: regex tests command: echo Hello, world stdout: contains_regex: # A list of regex patterns that should be in stdout (optional) - 'Hello.' # Note the single quotes, these are required for complex regexes - 'Hello .' # This will fail, since there is a comma after Hello, not a space
must_not_contain_regex: # A list of regex patterns that should not be in stdout (optional) - '^He.' # This will fail, since the regex matches Hello, world - '^Hello .' # Complex regexes will break yaml if double quotes are used
For more information on how Python parses regular expressions, see the Python documentation <https://docs.python.org/3/library/re.html>
_.
Documentation for more advanced use cases including the custom tests can be
found on our readthedocs page <https://pytest-workflow.readthedocs.io/>
_.
FAQs
A pytest plugin for configuring workflow/pipeline tests using YAML files
We found that pytest-workflow demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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.
Research
Malicious npm packages posing as Telegram bot libraries install SSH backdoors and exfiltrate data from Linux developer machines.
Security News
pip, PDM, pip-audit, and the packaging library are already adding support for Python’s new lock file format.
Product
Socket's Go support is now generally available, bringing automatic scanning and deep code analysis to all users with Go projects.