Skip to content

Commit a954648

Browse files
authored
Merge pull request #133 from nicoddemus/pytest-34-issue-132
Fix incompatibility with pytest 3.4
2 parents fdd98ea + 3ebec09 commit a954648

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ addons:
1212
env:
1313
- TOXENV=py27-pytest30-supported-xdist
1414
- TOXENV=py27-pytest31-supported-xdist
15+
- TOXENV=py27-pytest34-supported-xdist
1516
- TOXENV=py27-pytest30-unsupported-xdist
1617
- TOXENV=py34-pytest30-supported-xdist
1718
- TOXENV=py34-pytest31-supported-xdist
19+
- TOXENV=py34-pytest34-supported-xdist
1820
- TOXENV=py35-pytest30-supported-xdist
21+
- TOXENV=py35-pytest34-supported-xdist
1922
- TOXENV=py36-pytest30-supported-xdist
23+
- TOXENV=py36-pytest34-supported-xdist
2024
- TOXENV=py35-pytest30-unsupported-xdist
2125
- TOXENV=pypy-pytest30-supported-xdist
2226
- TOXENV=pypy-pytest31-supported-xdist

pytest_sugar.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,13 @@ def pytest_runtest_logstart(self, nodeid, location):
390390
# show the module_name & in verbose mode the test name.
391391
pass
392392

393+
if pytest.__version__ >= '3.4':
394+
395+
def pytest_runtest_logfinish(self):
396+
# prevent the default implementation to try to show
397+
# pytest's default progress
398+
pass
399+
393400
def report_key(self, report):
394401
"""Returns a key to identify which line the report should write to."""
395402
return report.location if self.showlongtestinfo else report.fspath

tox.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
envlist = py{27,34,35,36,py}-pytest30-supported-xdist,
88
py{27,35}-pytest30-unsupported-xdist,
99
py{27,34,py}-pytest31-supported-xdist
10+
py{27,34,py}-pytest34-supported-xdist
1011

1112
[testenv]
1213
passenv = CI TRAVIS_BUILD_ID TRAVIS TRAVIS_BRANCH TRAVIS_JOB_NUMBER TRAVIS_PULL_REQUEST TRAVIS_JOB_ID TRAVIS_REPO_SLUG TRAVIS_COMMIT
@@ -15,6 +16,7 @@ deps =
1516
pytest-cov
1617
pytest30: pytest>=3.0,<3.1
1718
pytest31: pytest>=3.1,<3.2
19+
pytest34: pytest>=3.4,<3.5
1820
termcolor>=1.1.0
1921
supported-xdist: pytest-xdist>=1.14
2022
unsupported-xdist: pytest-xdist<1.14

0 commit comments

Comments
 (0)