Skip to content

Commit 7dd5b9e

Browse files
committed
Fix automark_dependency handling for pytest-dependency main
- use Python 3.10 instead of pre-release version in CI - add some documentation links in README - fixes #58
1 parent 1b8b9fb commit 7dd5b9e

File tree

5 files changed

+32
-26
lines changed

5 files changed

+32
-26
lines changed

.github/workflows/pythontests.yml

+1-1
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: [3.6, 3.7, 3.8, 3.9, 3.10-dev, pypy3]
43+
python-version: [3.6, 3.7, 3.8, 3.9, "3.10", pypy3]
4444
exclude:
4545
- os: windows-latest
4646
python-version: pypy3

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
### Fixes
66
- correctly handle combined class and test order markers,
77
see [#45](https://github.com/pytest-dev/pytest-order/issues/45)
8+
- adapt code to changed type of `automark_dependency` in development branch
9+
of `pytest-dependency`,
10+
see [#58](https://github.com/pytest-dev/pytest-order/issues/58)
811

912
## [Version 1.0.0](https://pypi.org/project/pytest-order/1.0.0/) (2021-05-30)
1013
First Python 3 only version.

README.md

+22-20
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,34 @@ Documentation
2121
Apart from this overview, the following information is available:
2222
- usage documentation for the [latest release](https://pytest-dev.github.io/pytest-order/stable/)
2323
- usage documentation for the [current main branch](https://pytest-dev.github.io/pytest-order/dev/)
24-
- all examples shown in the documentation can also be found in the
24+
- most examples shown in the documentation can also be found in the
2525
[repository](https://github.com/pytest-dev/pytest-order/tree/main/example)
2626
- the [Release Notes](https://github.com/pytest-dev/pytest-order/blob/main/CHANGELOG.md)
2727
with a list of changes in the latest versions
2828
- a [list of open issues](https://github.com/pytest-dev/pytest-order/blob/main/old_issues.md)
2929
in the original project and their handling in `pytest-order`
3030

31+
Features
32+
--------
33+
`pytest-order` provides the following features:
34+
- ordering of tests [by index](https://pytest-dev.github.io/pytest-order/stable/usage.html#ordering-by-numbers)
35+
- ordering of tests both from the start and from the end (via negative
36+
index)
37+
- ordering of tests [relative to each other](https://pytest-dev.github.io/pytest-order/stable/usage.html#order-relative-to-other-tests)
38+
(via the `before` and `after` marker attributes)
39+
- session-, module- and class-scope ordering via the
40+
[order-scope](https://pytest-dev.github.io/pytest-order/stable/configuration.html#order-scope) option
41+
- directory scope ordering via the
42+
[order-scope-level](https://pytest-dev.github.io/pytest-order/stable/configuration.html#order-scope-level) option
43+
- hierarchical module and class-level ordering via the
44+
[order-group-scope](https://pytest-dev.github.io/pytest-order/stable/configuration.html#order-group-scope) option
45+
- ordering tests with `pytest-dependency` markers if using the
46+
[order-dependencies](https://pytest-dev.github.io/pytest-order/stable/configuration.html#order-dependencies) option,
47+
more information about `pytest-dependency` compatibility
48+
[here](https://pytest-dev.github.io/pytest-order/stable/other_plugins.html#relationship-with-pytest-dependency)
49+
- sparse ordering of tests via the
50+
[sparse-ordering](https://pytest-dev.github.io/pytest-order/stable/configuration.html#sparse-ordering) option
51+
3152
Overview
3253
--------
3354
_(adapted from the original project)_
@@ -70,25 +91,6 @@ yields the output:
7091

7192
=========================== 2 passed in 0.01 seconds ===========================
7293

73-
Features
74-
--------
75-
`pytest-order` provides the following features:
76-
- ordering of tests by index, as shown above
77-
- ordering of tests both from the start and from the end (via negative
78-
index)
79-
- ordering of tests relative to each other (via the `before` and `after`
80-
marker attributes)
81-
- session-, module- and class-scope ordering via the ``order-scope`` option
82-
- directory scope ordering via the ``order-scope-level`` option
83-
- hierarchical module and class-level ordering via the ``group-order-scope``
84-
option
85-
- ordering tests with `pytest-dependency` markers if using the
86-
``order-dependencies`` option
87-
- sparse ordering of tests via the ``sparse-ordering`` option
88-
89-
A usage guide for each feature can be
90-
found in the [documentation](https://pytest-dev.github.io/pytest-order/dev/).
91-
9294
Contributing
9395
------------
9496
Contributions are very welcome. Tests can be run with

pytest_order/settings.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,10 @@ def __init__(self, config: Config) -> None:
5656
self.group_scope = self.scope
5757
try:
5858
auto_mark_dep = config.getini("automark_dependency")
59+
if isinstance(auto_mark_dep, str):
60+
auto_mark_dep = auto_mark_dep.lower() in (
61+
"1", "yes", "y", "true", "t", "on"
62+
)
5963
except ValueError:
6064
auto_mark_dep = False
61-
self.auto_mark_dep = (
62-
auto_mark_dep
63-
and auto_mark_dep.lower() in ("1", "yes", "y", "true", "t", "on")
64-
)
65+
self.auto_mark_dep = auto_mark_dep

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tox]
22
envlist =
33
{py36,py37,py38,py39,pypy3}-pytest{50,51,52,53,54,60,61,62}
4-
{py310dev}-pytest{624}
4+
{py310}-pytest{624}
55
[testenv]
66
deps =
77
pytest50: pytest>=5.0,<5.1

0 commit comments

Comments
 (0)