Skip to content

Commit

Permalink
Addition of pytest case for not None values for frames and `sta…
Browse files Browse the repository at this point in the history
…rt`/`stop`/`step` (#4769)
  • Loading branch information
talagayev authored Nov 28, 2024
1 parent 441e2c6 commit 905f197
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions testsuite/MDAnalysisTests/analysis/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,19 @@ def test_incompatible_n_workers(u):
FrameAnalysis(u).run(backend=backend, n_workers=3)


def test_frame_values_incompatability(u):
start, stop, step = 0, 4, 1
frames = [1, 2, 3, 4]

with pytest.raises(ValueError,
match="start/stop/step cannot be combined with frames"):
FrameAnalysis(u.trajectory).run(
frames=frames,
start=start,
stop=stop,
step=step
)

def test_n_workers_conflict_raises_value_error(u):
backend_instance = ManyWorkersBackend(n_workers=4)

Expand Down

0 comments on commit 905f197

Please sign in to comment.