Handle gmxapi tmpi parameters better.
[alexxy/gromacs.git] / python_packaging / sample_restraint / tests / test_binding.py
index 7dff38ca63e8a48a20065752086d12f456c37cd6..a483fd799634236353c2342c567842de8afca07b 100644 (file)
@@ -35,16 +35,14 @@ def test_import():
 
 
 @pytest.mark.usefixtures("cleandir")
-def test_ensemble_potential_nompi(spc_water_box):
+def test_ensemble_potential_nompi(spc_water_box, mdrun_kwargs):
     """Test ensemble potential without an ensemble.
     """
     tpr_filename = spc_water_box
     print("Testing plugin potential with input file {}".format(os.path.abspath(tpr_filename)))
 
     assert gmx.version.api_is_at_least(0, 0, 5)
-    # Note that *threads* argument causes errors for MPI-enabled GROMACS.
-    # Ref #3563 and #3573
-    md = from_tpr([tpr_filename], append_output=False, threads=2)
+    md = from_tpr([tpr_filename], append_output=False, **mdrun_kwargs)
 
     # Create a WorkElement for the potential
     params = {'sites': [1, 4],
@@ -75,15 +73,13 @@ def test_ensemble_potential_nompi(spc_water_box):
 
 @pytest.mark.withmpi_only
 @pytest.mark.usefixtures("cleandir")
-def test_ensemble_potential_withmpi(spc_water_box):
+def test_ensemble_potential_withmpi(spc_water_box, mdrun_kwargs):
     tpr_filename = spc_water_box
 
     logger.info("Testing plugin potential with input file {}".format(os.path.abspath(tpr_filename)))
 
     assert gmx_version.api_is_at_least(0, 0, 5)
-    # Note that *threads* argument causes errors for MPI-enabled GROMACS.
-    # Ref #3563 and #3573
-    md = from_tpr([tpr_filename, tpr_filename], append_output=False, threads=2)
+    md = from_tpr([tpr_filename, tpr_filename], append_output=False, **mdrun_kwargs)
 
     # Create a WorkElement for the potential
     params = {'sites': [1, 4],