Skip to content

Commit 262848e

Browse files
committed
Fix support for pytest >= 3.10
Regards Teemu#133 Fixes Teemu#159
1 parent e8cb804 commit 262848e

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ matrix:
3131
python: '3.7'
3232
sudo: required
3333
dist: xenial
34+
- env: TOXENV=py37-pytest310-supported-xdist
35+
python: '3.7'
36+
sudo: required
37+
dist: xenial
3438
install: pip install -U tox
3539
script:
3640
- tox

pytest_sugar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ def pytest_runtest_logstart(self, nodeid, location):
398398
# show the module_name & in verbose mode the test name.
399399
pass
400400

401-
if pytest.__version__ >= '3.4':
401+
if tuple(int(x) for x in pytest.__version__.split('.')[:2]) >= (3, 4):
402402

403403
def pytest_runtest_logfinish(self):
404404
# prevent the default implementation to try to show

tox.ini

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
[tox]
77
envlist = py{27,34,35,36,py}-pytest30-supported-xdist,
88
py{27,35}-pytest30-unsupported-xdist,
9-
py{27,34,py}-pytest31-supported-xdist
10-
py{27,34,py}-pytest34-supported-xdist
9+
py{27,34,py}-pytest31-supported-xdist,
10+
py{27,34,py}-pytest34-supported-xdist,
11+
py37-pytest{39,310}-supported-xdist,
1112
qa
1213

1314
[testenv]
@@ -20,6 +21,7 @@ deps =
2021
pytest34: pytest>=3.4,<3.5
2122
pytest37: pytest>=3.7,<3.8
2223
pytest39: pytest>=3.9,<3.10
24+
pytest310: pytest>=3.10,<3.11
2325
termcolor>=1.1.0
2426
supported-xdist: pytest-xdist>=1.14
2527
unsupported-xdist: pytest-xdist<1.14

0 commit comments

Comments
 (0)