Skip to content

Commit

Permalink
Replace pytest_ordering with pytest_order
Browse files Browse the repository at this point in the history
pytest_ordering seems unmaintained as it hasn't been updated in two years: https://github.com/ftobia/pytest-ordering. It is also broken, at least in Nixpkgs: NixOS/nixpkgs#122264.
pytest_order is a maintained and working fork.
I added a similar patch to Nixpkgs a while ago to make it work there: https://github.com/NixOS/nixpkgs/blob/6965eef223f491cc1d9289ce972d8ab6811a2d28/pkgs/development/python-modules/ipfshttpclient/default.nix#L59-L63.

Co-authored-by: ntninja (Alexander Schlarb)
  • Loading branch information
Luflosi authored Jun 25, 2021
1 parent e02a95f commit f04ff60
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/functional/test_miscellaneous.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_id(client):
# Shutdown test #
#################

@pytest.mark.last
@pytest.mark.order("last")
def test_daemon_stop(daemon, client):
# The value for the `daemon` “fixture” is injected using a pytest plugin
# with access to the created daemon subprocess object defined directly
Expand Down
2 changes: 1 addition & 1 deletion test/run-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def pytest_pyfunc_call(self, pyfuncitem):
"localserver",
"pytest_cov",
"pytest_mock",
"pytest_ordering",
"pytest_order",
])

with tempfile.NamedTemporaryFile("r+") as coveragerc:
Expand Down
5 changes: 1 addition & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ deps =
pytest-dependency ~= 0.5
pytest-localserver ~= 0.5
pytest-mock ~= 3.5
pytest-ordering ~= 0.6
pytest-order ~= 0.8

pytest-cid ~= 1.1
py-cid
Expand Down Expand Up @@ -155,6 +155,3 @@ testpaths =
ipfshttpclient
test/unit
test/functional

markers =
last: marker supplied by but not registered by pytest-ordering module

0 comments on commit f04ff60

Please sign in to comment.