diff --git a/testsuite/MDAnalysisTests/analysis/test_base.py b/testsuite/MDAnalysisTests/analysis/test_base.py index 90887b2ad0..e2fe428376 100644 --- a/testsuite/MDAnalysisTests/analysis/test_base.py +++ b/testsuite/MDAnalysisTests/analysis/test_base.py @@ -121,6 +121,17 @@ def test_incompatible_n_workers(u): with pytest.raises(ValueError): FrameAnalysis(u).run(backend=backend, n_workers=3) + +def test_n_workers_conflict_raises_value_error(u): + backend_instance = ManyWorkersBackend(n_workers=4) + + with pytest.raises(ValueError, match="n_workers specified twice"): + FrameAnalysis(u.trajectory).run( + backend=backend_instance, + n_workers=1, + unsupported_backend=True + ) + @pytest.mark.parametrize('run_class,backend,n_workers', [ (Parallelizable, 'not-existing-backend', 2), (Parallelizable, 'not-existing-backend', None),