diff --git a/python/test/unit_distributed/runner.py b/python/test/unit_distributed/runner.py
index d17c3655a442e232e19d0e76953f9fbe7e39d877..401071da8df325829e34692d4d4dc211049d84a6 100644
--- a/python/test/unit_distributed/runner.py
+++ b/python/test/unit_distributed/runner.py
@@ -4,7 +4,13 @@
 
 import unittest
 import arbor as arb
-if (arb.mpi4py_compiled() and arb.mpi_compiled()):
+
+# check Arbor's configuration of mpi
+config = arb.config()
+mpi_enabled = config["mpi"]
+mpi4py_enabled = config["mpi4py"]
+
+if (mpi_enabled and mpi4py_enabled):
     import mpi4py.MPI as mpi
 
 # to be able to run .py file from child directory
@@ -47,9 +53,9 @@ if __name__ == "__main__":
         print(" Runner initializing mpi")
         arb.mpi_init()
 
-    if arb.mpi4py_compiled():
+    if mpi4py_enabled:
         comm = arb.mpi_comm_from_mpi4py(mpi.COMM_WORLD)
-    elif arb.mpi_compiled():
+    elif mpi_enabled:
         comm = arb.mpi_comm()
 
     alloc = arb.proc_allocation()
@@ -65,7 +71,4 @@ if __name__ == "__main__":
     runner.run(suite())
 
     if not arb.mpi_is_finalized():
-        #print(" Runner finalizing mpi")
        arb.mpi_finalize()
-    #else:
-       #print(" mpi already finalized!")
diff --git a/python/test/unit_distributed/test_contexts_arbmpi.py b/python/test/unit_distributed/test_contexts_arbmpi.py
index 85606170de9d7f23ddb747e67231b3ec48635fbb..e455b8edfdb589b2a2225f6c133c387f399a3877 100644
--- a/python/test/unit_distributed/test_contexts_arbmpi.py
+++ b/python/test/unit_distributed/test_contexts_arbmpi.py
@@ -17,13 +17,13 @@ except ModuleNotFoundError:
     from test import options
 
 # check Arbor's configuration of mpi
-dict = arb.config()
-mpi_check = dict["mpi"]
+config = arb.config()
+mpi_enabled = config["mpi"]
 
 """
 all tests for distributed arb.context using arbor mpi wrappers
 """
-@unittest.skipIf(mpi_check == False, "MPI not enabled!")
+@unittest.skipIf(mpi_enabled == False, "MPI not enabled")
 class Contexts_arbmpi(unittest.TestCase):
     # Initialize mpi only once in this class (when adding classes move initialization to setUpModule()
     @classmethod
diff --git a/python/test/unit_distributed/test_contexts_mpi4py.py b/python/test/unit_distributed/test_contexts_mpi4py.py
index 42526079067ea163293f72544dbd0e7e36fcd9c6..2f64dd8e9faa8f3c6e42eeba70afbdb99ff2bea2 100644
--- a/python/test/unit_distributed/test_contexts_mpi4py.py
+++ b/python/test/unit_distributed/test_contexts_mpi4py.py
@@ -17,18 +17,18 @@ except ModuleNotFoundError:
     from test import options
 
 # check Arbor's configuration of mpi
-dict = arb.config()
-config_mpi = dict["mpi"]
-config_mpi4py = dict["mpi4py"]
+config = arb.config()
+mpi_enabled = config["mpi"]
+mpi4py_enabled = config["mpi4py"]
 
-if (config_mpi and config_mpi4py):
+if (mpi_enabled and mpi4py_enabled):
     import mpi4py.MPI as mpi
 
 """
 all tests for distributed arb.context using mpi4py
 """
 # Only test class if env var ARB_WITH_MPI4PY=ON
-@unittest.skipIf(config_mpi == False or config_mpi4py == False, "MPI/mpi4py not enabled!")
+@unittest.skipIf(mpi_enabled == False or mpi4py_enabled == False, "MPI/mpi4py not enabled")
 class Contexts_mpi4py(unittest.TestCase):
     def test_initialize_mpi4py(self):
         # test mpi initialization (automatically when including mpi4py: https://mpi4py.readthedocs.io/en/stable/mpi4py.run.html)