Skip to content

Commit cc4c259

Browse files
Merge pull request #888 from aDNAn-itis/883
removing the deprecated TestRunner
2 parents a91c031 + 9c63d86 commit cc4c259

File tree

3 files changed

+7
-20
lines changed

3 files changed

+7
-20
lines changed

docs/changes/888.deprecation.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The use of ``astropy.tests.runner.TestRunner`` is now deprecated.

docs/index.rst

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,10 @@ Finally, install ``stingray`` itself::
226226
Test Suite
227227
----------
228228

229-
Please be sure to run the test suite before you use the package, and please report anything
229+
It's generally a good idea to run the test suite before you use the package, and please report anything
230230
you think might be bugs on our GitHub `Issues page <https://github.com/StingraySoftware/stingray/issues>`_.
231231

232-
Stingray uses `py.test <https://pytest.org>`_ and `tox
232+
Stingray uses `pytest <https://pytest.org>`_ and `tox
233233
<https://tox.readthedocs.io>`_ for testing.
234234

235235
If you downloaded the source code, e.g. via `git clone`, run the tests with::
@@ -246,16 +246,13 @@ To run a specific test file (e.g., test_io.py), try::
246246
$ py.test tests/test_io.py
247247

248248
If you have installed Stingray via pip or conda, the source directory might
249-
not be easily accessible. Once installed, you can also run the tests using::
249+
not be easily accessible. In this case, you can install the libraries needed for tests with::
250250

251-
$ python -c 'import stingray; stingray.test()'
251+
$ pip install "stingray[test]"
252252

253-
or from within a python interpreter:
253+
and then run the tests with::
254254

255-
.. doctest-skip::
256-
257-
>>> import stingray
258-
>>> stingray.test()
255+
$ pytest --pyargs stingray
259256

260257
Building the Documentation
261258
--------------------------

stingray/_astropy_init.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,3 @@
1414
from .version import version as __version__
1515
except ImportError:
1616
__version__ = ""
17-
18-
19-
if not _ASTROPY_SETUP_: # noqa
20-
import os
21-
22-
# Create the test function for self test
23-
from astropy.tests.runner import TestRunner
24-
25-
test = TestRunner.make_test_runner_in(os.path.dirname(__file__))
26-
test.__test__ = False
27-
__all__ += ["test"]

0 commit comments

Comments
 (0)