Skip to content

Commit 70b3f55

Browse files
committed
Add Python 3.10 to CI builds
- minor documentation updates
1 parent ecb6bbc commit 70b3f55

File tree

5 files changed

+39
-15
lines changed

5 files changed

+39
-15
lines changed

.github/workflows/pythontests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
fail-fast: false
4141
matrix:
4242
os: [ubuntu-latest, windows-latest]
43-
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, pypy2, pypy3]
43+
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10-dev, pypy2, pypy3]
4444
exclude:
4545
- os: windows-latest
4646
python-version: pypy2
@@ -70,7 +70,7 @@ jobs:
7070
python -m pip install pytest pytest-cov tox
7171
- name: Run tests
7272
run: |
73-
TOX_PYTHON_VERSION=$(if [ ${{ matrix.python-version }} = pypy2 ]; then echo "pypy2"; elif [ ${{ matrix.python-version }} = pypy3 ]; then echo "pypy3"; else echo py${{ matrix.python-version }} | tr -d .; fi)
73+
TOX_PYTHON_VERSION=$(if [ ${{ matrix.python-version }} = pypy2 ]; then echo "pypy2"; elif [ ${{ matrix.python-version }} = pypy3 ]; then echo "pypy3"; else echo py${{ matrix.python-version }} | tr -d .-; fi)
7474
COV_CMD=$(if [ ${{ matrix.python-version }} = 3.8 ]; then echo "--cov=./pytest_order/ --cov-report=xml"; else echo ; fi) tox -e $(tox -l | grep $TOX_PYTHON_VERSION | paste -sd "," -)
7575
- name: Upload coverage to Codecov
7676
uses: codecov/codecov-action@v1

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ test shall be run relative to the other tests.
1212
some additional features - see [below](#comparison-with-pytest_ordering) for
1313
details.
1414

15-
`pytest-order` works with Python 2.7 and 3.5 - 3.9, with pytest
16-
versions >= 3.7.0, and runs on Linux, MacOs and Windows.
15+
`pytest-order` works with Python 2.7 and 3.5 - 3.10, with pytest
16+
versions >= 3.7.0, and runs on Linux, macOS and Windows.
1717

1818
Documentation
1919
-------------
@@ -88,6 +88,17 @@ Features
8888
A usage guide for each feature can be
8989
found in the [documentation](https://pytest-dev.github.io/pytest-order/dev/).
9090

91+
Contributing
92+
------------
93+
Contributions are very welcome. Tests can be run with
94+
[tox](https://tox.readthedocs.io/en/latest/), please ensure
95+
the coverage at least stays the same before you submit a pull request.
96+
97+
License
98+
-------
99+
Distributed under the terms of the [MIT](http://opensource.org/licenses/MIT)
100+
license, `pytest-order` is free and open source software.
101+
91102
History
92103
-------
93104
This is a fork of [pytest-ordering](https://github.com/ftobia/pytest-ordering).
@@ -104,7 +115,7 @@ with `pytest-ordering` due to the changed marker name (`order` instead of
104115
rationale see also
105116
[this issue](https://github.com/ftobia/pytest-ordering/issues/38)).
106117

107-
Ordering relative to other tests and all of the configuration options are not
118+
Ordering relative to other tests and all the configuration options are not
108119
available in the released version of `pytest-ordering`.
109120
However, most of these features are derived from
110121
[issues](https://github.com/pytest-dev/pytest-order/blob/main/old_issues.md)

docs/source/index.rst

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ ordering, all configuration options) that are not available in
3838

3939
Supported Python and pytest versions
4040
------------------------------------
41-
``pytest-order`` supports python 2.7, 3.5 - 3.9, and pypy/pypy3, and is
41+
``pytest-order`` supports python 2.7, 3.5 - 3.10, and pypy/pypy3, and is
4242
compatible with pytest 3.7.0 or newer. Note that support for Python 2 will
4343
be removed in one of the next versions.
4444

@@ -460,7 +460,7 @@ regardless of the ordinal markers.
460460
Several relationships for the same marker
461461
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
462462
If you need to order a certain test relative to more than one other test, you
463-
can add more than one test name to the ``before`` or ``after marker
463+
can add more than one test name to the ``before`` or ``after`` marker
464464
attributes, separated by spaces:
465465

466466
.. code:: python
@@ -1016,7 +1016,7 @@ Using pytest-order with other pytest plugins
10161016

10171017
Relationship with pytest-dependency
10181018
-----------------------------------
1019-
The `pytest-dependency <https://pypi.org/project/pytest-dependency/>`__
1019+
The `pytest-dependency`_
10201020
plugin also manages dependencies between tests (skips tests that depend
10211021
on skipped or failed tests), but currently doesn't do any ordering. If you
10221022
want to execute the tests in a specific order to each other, you can use
@@ -1025,11 +1025,11 @@ tests you can use ``pytest-dependency``. If you want to have both behaviors
10251025
combined, you can use both plugins together with the
10261026
option :ref:`order-dependencies`, described above.
10271027

1028-
Using together with pytest-randomly
1029-
-----------------------------------
1028+
Usage with other ordering plugins
1029+
---------------------------------
10301030
There is a number of other pytest plugins that change the order in which tests
10311031
are executed, the most widely known probably being
1032-
`pytest-randomly <https://pypi.org/project/pytest-randomly/>`__, which
1032+
`pytest-randomly`_, which
10331033
executes tests in a random order to avoid unknown test dependencies.
10341034
``pytest-order`` should still work with these as long as it is executed
10351035
*after* the other plugins (which it should by default, except if you use
@@ -1080,10 +1080,17 @@ The same is true for relative ordering. The tests will be correctly ordered
10801080
before and after the tests as configured, but all other tests will be in an
10811081
arbitrary order.
10821082

1083+
Note that it does not make much sense to use ordering plugins together that
1084+
have a similar goal as ``pytest-order``, as for example ``pytest-ordering``.
1085+
As mentioned, both plugins can co-exist without problems due to the
1086+
different marker names, but using markers of both plugins in the same test
1087+
run is not recommended. One plugin may partially revert the effects of the
1088+
other plugin in unpredictable ways. The same is true for other plugins that
1089+
define the test order.
10831090

10841091
Usage with pytest-xdist
10851092
-----------------------
1086-
The `pytest-xdist <https://pypi.org/project/pytest-xdist/>`__ plugin
1093+
The `pytest-xdist`_ plugin
10871094
schedules tests unordered, and the order configured by ``pytest-order``
10881095
will normally not be preserved. But if we use the ``--dist=loadfile``
10891096
option, provided by ``xdist``, all tests from one file will be run in the
@@ -1094,3 +1101,8 @@ each group of dependent tests in one file, and call pytest with
10941101

10951102
.. toctree::
10961103
:maxdepth: 2
1104+
1105+
1106+
.. _`pytest-xdist`: https://pypi.org/project/pytest-xdist/
1107+
.. _`pytest-randomly`: https://pypi.org/project/pytest-randomly/
1108+
.. _`pytest-dependency`: https://pypi.org/project/pytest-dependency/

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"Programming Language :: Python :: 3.7",
4848
"Programming Language :: Python :: 3.8",
4949
"Programming Language :: Python :: 3.9",
50+
"Programming Language :: Python :: 3.10",
5051
"Programming Language :: Python :: Implementation :: CPython",
5152
"Programming Language :: Python :: Implementation :: PyPy",
5253
],

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# content of: tox.ini, put in same dir as setup.py
22
[tox]
33
envlist =
4-
{py27,py35,py36,py37,py38,py39,pypy2,pypy3}-pytest{37,38,39,310,40,41,42,43,44,45,46}
5-
{py35,py36,py37,py38,py39,pypy3}-pytest{50,51,52,53,54,60,61}
6-
{py36,py37,py38,py39,pypy3}-pytest62
4+
{py27,py35,py36,py37,py38,py39,py310dev,pypy2,pypy3}-pytest{37,38,39,310,40,41,42,43,44,45,46}
5+
{py35,py36,py37,py38,py39,py310dev,pypy3}-pytest{50,51,52,53,54,60,61}
6+
{py36,py37,py38,py39,py310,pypy3}-pytest62
77
[testenv]
88
deps =
99
pytest37: pytest>=3.7,<3.8

0 commit comments

Comments
 (0)