File tree Expand file tree Collapse file tree
testsuite/MDAnalysisTests/transformations Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -381,26 +381,14 @@ def test_notinvertible(nojump_universe):
381381 transformed_coordinates = u .trajectory .timeseries ()[0 ]
382382
383383
384- def test_nojump_fails_when_not_at_frame_0 ():
384+ @pytest .mark .parametrize ("frame_index" , [- 1 , 5 ])
385+ def test_nojump_fails_when_not_at_frame_0 (frame_index ):
385386 """
386387 Test that NoJump raises a clear error when applied to a trajectory
387388 that is not at frame 0.
388389 """
389390 u = mda .Universe (data .PSF_TRICLINIC , data .DCD_TRICLINIC )
390- u .trajectory [- 1 ]
391-
392- with pytest .raises (
393- ValueError , match = "must be applied starting from frame 0"
394- ):
395- u .trajectory .add_transformations (NoJump ())
396-
397-
398- def test_nojump_fails_midtrajectory ():
399- """
400- Test that NoJump raises a clear error when applied in the middle of a trajectory.
401- """
402- u = mda .Universe (data .PSF_TRICLINIC , data .DCD_TRICLINIC )
403- u .trajectory [5 ]
391+ u .trajectory [frame_index ]
404392
405393 with pytest .raises (
406394 ValueError , match = "must be applied starting from frame 0"
You can’t perform that action at this time.
0 commit comments