Skip to content

Commit efce50f

Browse files
Merge pull request #261 from nicoddemus/pytest33
Fix tests in pytest >= 3.3 and add it to build matrix
2 parents ed9f25a + db1fb68 commit efce50f

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ env:
2020
- TOXENV=py-pytest30
2121
- TOXENV=py-pytest31
2222
- TOXENV=py-pytest32
23+
- TOXENV=py-pytest33
2324

2425
install: pip install tox setuptools_scm
2526
script: tox

appveyor.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
environment:
22
matrix:
33
# note: please use "tox --listenvs" to populate the build matrix
4-
- TOXENV: "py27-pytest30"
5-
- TOXENV: "py34-pytest30"
6-
- TOXENV: "py35-pytest30"
7-
- TOXENV: "py36-pytest30"
8-
- TOXENV: "py27-pytest30-pexpect"
9-
- TOXENV: "py35-pytest30-pexpect"
4+
- TOXENV: "py27-pytest33"
5+
- TOXENV: "py34-pytest33"
6+
- TOXENV: "py35-pytest33"
7+
- TOXENV: "py36-pytest33"
8+
- TOXENV: "py27-pytest33-pexpect"
9+
- TOXENV: "py36-pytest33-pexpect"
1010
- TOXENV: "flakes"
1111
- TOXENV: "readme"
1212

testing/acceptance_test.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,13 @@ def parse_tests_and_workers_from_output(lines):
860860
result = []
861861
for line in lines:
862862
# example match: "[gw0] PASSED test_a.py::test[7]"
863-
m = re.match(r'\[(gw\d)\]\s(.*?)\s(.*::.*)', line.strip())
863+
m = re.match(r'''
864+
\[(gw\d)\] # worker
865+
\s*
866+
(?:\[\s*\d+%\])? # progress indicator (pytest >=3.3)
867+
\s(.*?) # status string ("PASSED")
868+
\s(.*::.*) # nodeid
869+
''', line.strip(), re.VERBOSE)
864870
if m:
865871
worker, status, nodeid = m.groups()
866872
result.append((worker, status, nodeid))

tox.ini

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[tox]
22
# if you change the envlist, please update .travis.yml file as well
33
envlist=
4-
py{27,34,35,36}-pytest{30,31,32}
5-
py{27,36}-pytest{30,31,32}-pexpect
4+
py{27,34,35,36}-pytest{30,31,32,33}
5+
py{27,36}-pytest{30,31,32,33}-pexpect
66
py{27,36}-pytest{master,features}
77
flakes
88
readme
@@ -18,6 +18,7 @@ deps =
1818
pytest30: pytest~=3.0.5
1919
pytest31: pytest~=3.1.0
2020
pytest32: pytest~=3.2.0
21+
pytest33: pytest~=3.3.0
2122
pytestmaster: git+https://github.com/pytest-dev/pytest.git@master
2223
pytestfeatures: git+https://github.com/pytest-dev/pytest.git@features
2324
pexpect: pexpect

0 commit comments

Comments
 (0)