Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

Commit 01727fc

Browse files
authored
Fix test infrastructure for pytest > 4 and bump CI pytest version (#728)
Issues were caused by https://docs.pytest.org/en/latest/historical-notes.html#marker-revamp
1 parent 277bd0d commit 01727fc

File tree

8 files changed

+20
-19
lines changed

8 files changed

+20
-19
lines changed

conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def test_not_ok_with_random_data():
150150
151151
"""
152152

153-
seed = request.node.get_marker('seed')
153+
seed = request.node.get_closest_marker('seed')
154154
env_seed_str = os.getenv('MXNET_TEST_SEED')
155155

156156
if seed is not None:

env/cpu/py2.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ dependencies:
99
- sphinx=1.7.7
1010
- spacy
1111
- nltk
12-
- pytest<4
13-
- flaky<4
14-
- pytest-cov=2.6.0
12+
- pytest=4.5.0
13+
- flaky=3.5.3
14+
- pytest-cov=2.7.1
1515
- mock<3
1616
- pytest-xdist<2
1717
- pip:

env/cpu/py3-master.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ dependencies:
99
- sphinx=1.7.7
1010
- spacy
1111
- nltk
12-
- pytest<4
13-
- flaky<4
14-
- pytest-cov=2.6.0
12+
- pytest=4.5.0
13+
- flaky=3.5.3
14+
- pytest-cov=2.7.1
1515
- mock<3
1616
- pytest-xdist<2
1717
- pip:

env/cpu/py3.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ dependencies:
99
- sphinx=1.7.7
1010
- spacy
1111
- nltk
12-
- pytest<4
13-
- flaky<4
14-
- pytest-cov=2.6.0
12+
- pytest=4.5.0
13+
- flaky=3.5.3
14+
- pytest-cov=2.7.1
1515
- mock<3
1616
- pytest-xdist<1.28
1717
- recommonmark

env/gpu/py2.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ dependencies:
99
- sphinx=1.7.7
1010
- spacy
1111
- nltk
12-
- pytest<4
13-
- flaky<4
14-
- pytest-cov=2.6.0
12+
- pytest=4.5.0
13+
- flaky=3.5.3
14+
- pytest-cov=2.7.1
1515
- mock<3
1616
- pytest-xdist<2
1717
- pip:

env/gpu/py3-master.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ dependencies:
99
- sphinx=1.7.7
1010
- spacy
1111
- nltk
12-
- pytest<4
13-
- flaky<4
14-
- pytest-cov=2.6.0
12+
- pytest=4.5.0
13+
- flaky=3.5.3
14+
- pytest-cov=2.7.1
1515
- mock<3
1616
- pytest-xdist<2
1717
- recommonmark

env/gpu/py3.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ dependencies:
99
- sphinx=1.7.7
1010
- spacy
1111
- nltk
12-
- pytest<4
13-
- flaky<4
14-
- pytest-cov=2.6.0
12+
- pytest=4.5.0
13+
- flaky=3.5.3
14+
- pytest-cov=2.7.1
1515
- mock<3
1616
- pytest-xdist<2
1717
- recommonmark

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def find_version(*file_paths):
6969
'sphinx-gallery',
7070
'sphinx_rtd_theme',
7171
'nbsphinx',
72+
'flaky',
7273
],
7374
},
7475
)

0 commit comments

Comments
 (0)