Skip to content

Commit 07ef877

Browse files
pllimmhvk
authored andcommitted
Pin Travis pytest to 3.0.5. Got rid of TestRunner warnings for real.
1 parent 94873d0 commit 07ef877

3 files changed

Lines changed: 10 additions & 11 deletions

File tree

‎.travis.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ env:
2727
- MAIN_CMD='python setup.py'
2828
- CONDA_DEPENDENCIES='Cython jinja2'
2929
- CONDA_ALL_DEPENDENCIES='Cython jinja2 scipy h5py matplotlib pyyaml scikit-image pandas pytz beautifulsoup4 ipython mpmath'
30-
- PIP_DEPENDENCIES=''
30+
- PIP_DEPENDENCIES='pytest>=3'
3131
- SETUP_XVFB=True
3232
- SPHINX_VERSION='<1.5'
3333

‎astropy/conftest.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,3 @@
1414
enable_deprecations_as_exceptions(include_astropy_deprecations=False)
1515

1616
PYTEST_HEADER_MODULES['Cython'] = 'cython'
17-
18-
# To avoid warnings in pytest 3.x
19-
collect_ignore = ['astropy/tests/runner.py']

‎astropy/tests/tests/test_runner.py‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
from astropy.tests.runner import TestRunner, TestRunnerBase, keyword
1+
from astropy.tests.runner import TestRunner as T_Runner
2+
from astropy.tests.runner import TestRunnerBase as T_RunnerBase
3+
from astropy.tests.runner import keyword
24
from astropy.tests.helper import pytest
35

46

57
def test_disable_kwarg():
6-
class no_remote_data(TestRunner):
8+
class no_remote_data(T_Runner):
79
@keyword()
810
def remote_data(self, remote_data, kwargs):
911
return NotImplemented
@@ -14,13 +16,13 @@ def remote_data(self, remote_data, kwargs):
1416

1517

1618
def test_wrong_kwarg():
17-
r = TestRunner('.')
19+
r = T_Runner('.')
1820
with pytest.raises(TypeError):
1921
r.run_tests(spam='eggs')
2022

2123

2224
def test_invalid_kwarg():
23-
class bad_return(TestRunnerBase):
25+
class bad_return(T_RunnerBase):
2426
@keyword()
2527
def remote_data(self, remote_data, kwargs):
2628
return 'bob'
@@ -31,7 +33,7 @@ def remote_data(self, remote_data, kwargs):
3133

3234

3335
def test_new_kwarg():
34-
class Spam(TestRunnerBase):
36+
class Spam(T_RunnerBase):
3537
@keyword()
3638
def spam(self, spam, kwargs):
3739
return [spam]
@@ -44,7 +46,7 @@ def spam(self, spam, kwargs):
4446

4547

4648
def test_priority():
47-
class Spam(TestRunnerBase):
49+
class Spam(T_RunnerBase):
4850
@keyword()
4951
def spam(self, spam, kwargs):
5052
return [spam]
@@ -61,7 +63,7 @@ def eggs(self, eggs, kwargs):
6163

6264

6365
def test_docs():
64-
class Spam(TestRunnerBase):
66+
class Spam(T_RunnerBase):
6567
@keyword()
6668
def spam(self, spam, kwargs):
6769
"""

0 commit comments

Comments
 (0)