Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Readme
pytest-order
is a pytest plugin that allows you to customize the order in which
your tests are run. It uses the marker order
that defines when a specific
test shall run, either by using an ordinal number, or by specifying the
relationship to other tests.
pytest-order
is a fork of
pytest-ordering that provides
additional features like ordering relative to other tests.
pytest-order
works with Python 3.7 - 3.12, with pytest
versions >= 5.0.0 for all versions up to Python 3.9, and for pytest >=
6.2.4 for Python >= 3.10. pytest-order
runs on Linux, macOS and Windows.
Apart from this overview, the following information is available:
pytest-order
pytest-order
provides the following features:
before
and after
marker attributes)pytest-dependency
markers if using the
order-dependencies option,
more information about pytest-dependency
compatibility
here(adapted from the original project)
Have you ever wanted to easily run one of your tests before any others run? Or run some tests last? Or run this one test before that other test? Or make sure that this group of tests runs after this other group of tests?
Now you can.
Install with:
pip install pytest-order
This defines the order
marker that you can use in your code with
different attributes.
For example, this code:
import pytest
@pytest.mark.order(2)
def test_foo():
assert True
@pytest.mark.order(1)
def test_bar():
assert True
yields the output:
$ pytest test_foo.py -vv
============================= test session starts ==============================
platform darwin -- Python 3.7.1, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- env/bin/python
plugins: order
collected 2 items
test_foo.py:7: test_bar PASSED
test_foo.py:3: test_foo PASSED
=========================== 2 passed in 0.01 seconds ===========================
Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.
Distributed under the terms of the MIT
license, pytest-order
is free and open source software.
This is a fork of pytest-ordering.
That project is not maintained anymore, and there are several helpful PRs
that are now integrated into pytest-order
. The idea and most of the
initial code has been created by Frank Tobia, the author of that plugin, and
contributors.
While derived from pytest_ordering
, pytest-order
is not compatible
with pytest-ordering
due to the changed marker name (order
instead of
run
). Additional markers defined pytest_ordering
are all integrated
into the order
marker (for a rationale see also
this issue).
Ordering relative to other tests and all the configuration options are not
available in the released version of pytest-ordering
.
However, most of these features are derived from or inspired by
issues
and pull requests already existing in pytest-ordering
.
FAQs
pytest plugin to run your tests in a specific order
We found that pytest-order 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.