Skip to content

Commit bc736dc

Browse files
authored
replace nose with pytest in docs and comments. (mdtraj#1404)
replace nose with pytest in docs and comments. [ci skip]
1 parent ec21ea2 commit bc736dc

14 files changed

+21
-21
lines changed

.github/CONTRIBUTING.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Tests
1818
-----
1919

2020
Writing unit tests in a dynamic language like Python is very important.
21-
Writing tests is annoying, but it pays off big time. `Nose
22-
<https://nose.readthedocs.org/en/latest/>`_ makes writing tests pretty
21+
Writing tests is annoying, but it pays off big time. `PyTest
22+
<https://pytest.readthedocs.org/en/latest/>`_ makes writing tests pretty
2323
easy, and MDTraj has some testing infrastructure to make it easier. We will
2424
probably refuse your pull-request if it doesn't include tests.
2525

@@ -50,7 +50,7 @@ for ``XTCTrajectoryFormat.read()`` is below. Note that the signature comes
5050
before the 1 line summary. ::
5151

5252
"""read(n_frames=None, stride=1, atom_indices=None)
53-
53+
5454
Read data from an XTC file
5555

5656
Parameters
@@ -76,5 +76,5 @@ before the 1 line summary. ::
7676
box : np.ndarray, shape=(n_frames, 3, 3), dtype=np.float32
7777
The box vectors in each frame.
7878
"""
79-
79+
8080
.. vim: tw=75

docs/installation.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ Testing Your Installation
3030
-------------------------
3131

3232
Running the tests is a great way to verify that everything is working. The test
33-
suite uses `nose <https://nose.readthedocs.org/en/latest/>`_, which you can pick
33+
suite uses `pytest <https://pytest.readthedocs.org/en/latest/>`_, which you can pick
3434
up via ``pip`` if you don't already have it. ::
3535

36-
pip install nose
36+
pip install pytest
3737

3838
Then, to run the tests, execute the command ::
3939

40-
nosetests mdtraj -v
40+
pytest mdtraj -v
4141

4242
Compiling From Source
4343
---------------------

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ runipy
77
openmm
88
pytables
99
scikit-learn
10-
nose
10+
pytest
1111
pandas
1212
numpydoc

tests/test_gro.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
def teardown_module(module):
3434
"""remove the temporary file created by tests in this file
35-
this gets automatically called by nose"""
35+
this gets automatically called by pytest"""
3636
os.unlink(temp)
3737

3838

tests/test_hdf5.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
fd, temp = tempfile.mkstemp(suffix='.h5')
4040
def teardown_module(module):
4141
"""remove the temporary file created by tests in this file
42-
this gets automatically called by nose"""
42+
this gets automatically called by pytest"""
4343
os.close(fd)
4444
os.unlink(temp)
4545

@@ -252,13 +252,13 @@ def test_do_overwrite():
252252
with HDF5TrajectoryFile(temp, 'w', force_overwrite=True) as f:
253253
f.write(np.random.randn(10,5,3))
254254

255-
255+
256256
def test_vsite_elements(get_fn):
257257
# Test case for issue #265
258258
pdb_filename = get_fn('GG-tip4pew.pdb')
259259
trj = md.load(pdb_filename)
260260
trj.save_hdf5(temp)
261-
261+
262262
trj2 = md.load(temp, top=pdb_filename)
263263

264264
def test_dont_overwrite():

tests/test_io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
def teardown_module(module):
3838
"""remove the temporary file created by tests in this file
39-
this gets automatically called by nose"""
39+
this gets automatically called by pytest"""
4040
os.unlink(temp)
4141

4242

tests/test_lammpstrj.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
fd, temp = tempfile.mkstemp(suffix='.lammpstrj')
3434
def teardown_module(module):
3535
"""Remove the temporary file created by tests in this file
36-
this gets automatically called by nose. """
36+
this gets automatically called by pytest. """
3737
os.close(fd)
3838
os.unlink(temp)
3939

tests/test_lh5.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
def teardown_module(module):
4242
"""remove the temporary file created by tests in this file
43-
this gets automatically called by nose"""
43+
this gets automatically called by pytest"""
4444
os.close(fd)
4545
os.unlink(temp)
4646

tests/test_mdcrd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
def teardown_module(module):
3434
"""remove the temporary file created by tests in this file
35-
this gets automatically called by nose"""
35+
this gets automatically called by pytest"""
3636
os.close(fd)
3737
os.unlink(temp)
3838

tests/test_netcdf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
def teardown_module(module):
4444
"""remove the temporary file created by tests in this file
45-
this gets automatically called by nose"""
45+
this gets automatically called by pytest"""
4646
os.close(fd)
4747
os.close(fd2)
4848
os.unlink(temp)

0 commit comments

Comments
 (0)