From 150ee4b85c46a84ecb3a1cc63860de3ae54781aa Mon Sep 17 00:00:00 2001 From: Valerij Talagayev <82884038+talagayev@users.noreply.github.com> Date: Tue, 29 Oct 2024 12:50:30 +0100 Subject: [PATCH] Update test_base.py Addition of test for serial backend instance --- testsuite/MDAnalysisTests/analysis/test_base.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/testsuite/MDAnalysisTests/analysis/test_base.py b/testsuite/MDAnalysisTests/analysis/test_base.py index 68b86fc943..4ca0132594 100644 --- a/testsuite/MDAnalysisTests/analysis/test_base.py +++ b/testsuite/MDAnalysisTests/analysis/test_base.py @@ -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)