Skip to content

Commit

Permalink
Update test_base.py
Browse files Browse the repository at this point in the history
Addition of test for serial backend instance
  • Loading branch information
talagayev authored Oct 29, 2024
1 parent e776f12 commit 150ee4b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions testsuite/MDAnalysisTests/analysis/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,18 @@ def test_parallelizable_transformations():
with pytest.raises(ValueError):
FrameAnalysis(u.trajectory).run(backend='multiprocessing')

def test_instance_serial_backend(u):
serial_backend = backends.BackendSerial(n_workers=1)

FrameAnalysis(u.trajectory).run(
backend=serial_backend,
verbose=True,
progressbar_kwargs={"leave": True},
unsupported_backend=True
)

assert isinstance(serial_backend, backends.BackendSerial)

def test_frame_bool_fail(client_FrameAnalysis):
u = mda.Universe(TPR, XTC) # dt = 100
an = FrameAnalysis(u.trajectory)
Expand Down

0 comments on commit 150ee4b

Please sign in to comment.