diff --git a/tests/adapters/test_regrid.py b/tests/adapters/test_regrid.py
index a828c0c36a87f8508b4c27282a1aae264796f212..8a93d139af126e78340542fcde3b3bf5b1552757 100644
--- a/tests/adapters/test_regrid.py
+++ b/tests/adapters/test_regrid.py
@@ -535,3 +535,7 @@ class TestRegrid(unittest.TestCase):
         self.assertEqual(sink.data["Input"][0, 0], 1.0 * UNITS.meter)
         self.assertEqual(sink.data["Input"][0, 1], 0.5 * UNITS.meter)
         self.assertEqual(sink.data["Input"][0, 9], 0.5 * UNITS.meter)
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/tests/adapters/test_stats.py b/tests/adapters/test_stats.py
index 6d689aea59f360223bec5887aa94ce3a86636fdf..c887efd35515396f4b83ffd8c8470a0603166a7c 100644
--- a/tests/adapters/test_stats.py
+++ b/tests/adapters/test_stats.py
@@ -39,3 +39,7 @@ class TestHistogram(unittest.TestCase):
         self.assertEqual(fm.data.get_units(data), fm.UNITS.dimensionless)
 
         composition.run(end_time=datetime(2000, 1, 10))
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/tests/adapters/test_time.py b/tests/adapters/test_time.py
index 82bab928fbdd4e2c4c14e764d88c657938335aad..a8592ac0d6cdbdc4dc21c5503d9e5755566f88d6 100644
--- a/tests/adapters/test_time.py
+++ b/tests/adapters/test_time.py
@@ -1,6 +1,7 @@
 """
 Unit tests for the adapters.time module.
 """
+
 import unittest
 from datetime import datetime, timedelta
 
diff --git a/tests/adapters/test_time_integration.py b/tests/adapters/test_time_integration.py
index 624f7da065210bca3d78f4566e4644098e7fd37d..e99020d2f321a0c14f122b69d7f44c7838b7bc3e 100644
--- a/tests/adapters/test_time_integration.py
+++ b/tests/adapters/test_time_integration.py
@@ -1,6 +1,7 @@
 """
 Unit tests for the adapters.time module.
 """
+
 import unittest
 from datetime import datetime, timedelta
 
diff --git a/tests/core/test_propagate_info.py b/tests/core/test_propagate_info.py
index 7ecb64dbc19fe6fa1bbc9ab486842cfdb6ab701a..e3cdbc1843683b61dfc97c51a9c039c884b3634c 100644
--- a/tests/core/test_propagate_info.py
+++ b/tests/core/test_propagate_info.py
@@ -1,6 +1,7 @@
 """
 Unit tests for data info propagation.
 """
+
 import unittest
 from datetime import datetime, timedelta
 
@@ -199,3 +200,7 @@ class TestPropagate(unittest.TestCase):
             source.out_info.time,
             time,
         )
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/tests/core/test_pull_based_component.py b/tests/core/test_pull_based_component.py
index 0dcca3da9d3259a69de08b0b176fec7affe7a1ef..2b01d0030385f4e89076e2a9d5087007397cd376 100644
--- a/tests/core/test_pull_based_component.py
+++ b/tests/core/test_pull_based_component.py
@@ -55,3 +55,7 @@ class TestPullBasedComponent(unittest.TestCase):
         composition.run(start_time=time, end_time=datetime(2000, 1, 12))
 
         self.assertEqual(consumer.data, {"In": 12})
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/tests/core/test_schedule.py b/tests/core/test_schedule.py
index c8022b344a81d97c6f022796cf948b784829422c..409e707fa51d5df7fa2b2868858d39aa08bfce2a 100644
--- a/tests/core/test_schedule.py
+++ b/tests/core/test_schedule.py
@@ -1,6 +1,7 @@
 """
 Unit tests for the driver/scheduler.
 """
+
 import logging
 import os
 import pprint
diff --git a/tests/core/test_sdk.py b/tests/core/test_sdk.py
index d362e6d272963e6696a20771f43df409da479251..866fa985502499dbc937e20005f415c5091e0692 100644
--- a/tests/core/test_sdk.py
+++ b/tests/core/test_sdk.py
@@ -1,6 +1,7 @@
 """
 Unit tests for the sdk implementations.
 """
+
 import logging
 import os.path
 import tempfile
diff --git a/tests/core/test_units.py b/tests/core/test_units.py
index 2caddd0161677f6b0c71794ca450721b425b0724..b4d685a5f205d2a095143e92f06878fc2e613db0 100644
--- a/tests/core/test_units.py
+++ b/tests/core/test_units.py
@@ -1,6 +1,7 @@
 """
 Unit tests for data info propagation.
 """
+
 import unittest
 from datetime import datetime, timedelta
 
@@ -112,3 +113,7 @@ class TestUnits(unittest.TestCase):
 
         with self.assertRaises(FinamMetaDataError):
             composition.run(start_time=time, end_time=datetime(2000, 1, 2))
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/tests/data/test_cf_units.py b/tests/data/test_cf_units.py
index 9a54c65bb207253740222f885eff2a293b9d0247..c6e5404f4c62edfe17e19496bc73bfb9cf35d660 100644
--- a/tests/data/test_cf_units.py
+++ b/tests/data/test_cf_units.py
@@ -29,3 +29,7 @@ class TestCfUnits(unittest.TestCase):
 
         self.assertEqual(u("m/s"), "m s-1")
         self.assertEqual(u("m s-1"), "m s-1")
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/tests/data/test_grid_spec.py b/tests/data/test_grid_spec.py
index fe97d0b513c06832d03ee3890ec7887f939da3bd..e5086539176196a5804bec351aa43aa7d00ff9f2 100644
--- a/tests/data/test_grid_spec.py
+++ b/tests/data/test_grid_spec.py
@@ -345,3 +345,7 @@ class TestGridSpec(unittest.TestCase):
         assert_array_equal(grid.cell_types, [CellType.HEX])
         grid = UniformGrid((2, 2, 3))
         assert_array_equal(grid.cell_types, [CellType.HEX, CellType.HEX])
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/tests/data/test_grid_tools.py b/tests/data/test_grid_tools.py
index e9f5dc3f398eaccc1fb72cdee8a28c67bbaf7783..e81913dab6aadcfda5b3ef1ce48860f841faf281 100644
--- a/tests/data/test_grid_tools.py
+++ b/tests/data/test_grid_tools.py
@@ -255,3 +255,7 @@ class TestGridTools(unittest.TestCase):
 
         test_type = INV_VTK_TYPE_MAP[VTK_TYPE_MAP]
         assert_array_equal(test_type, range(6))
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/tests/data/test_masked.py b/tests/data/test_masked.py
index 464c2d46a0ce110ea076eaa5eed7ca90533d6987..900541d92425a9c017d05531cc3644d87167baa5 100644
--- a/tests/data/test_masked.py
+++ b/tests/data/test_masked.py
@@ -1,6 +1,7 @@
 """
 Unit tests for masked data.
 """
+
 import unittest
 from datetime import datetime, timedelta
 
diff --git a/tests/modules/test_callback.py b/tests/modules/test_callback.py
index f462c5744949ef076b7da1b214575a319715673e..b67a944a04e0cf267a8e597b22f677cc00c1c44f 100644
--- a/tests/modules/test_callback.py
+++ b/tests/modules/test_callback.py
@@ -62,3 +62,7 @@ class TestCallback(unittest.TestCase):
         out_data = consumer.data["In1"]
         self.assertGreaterEqual(out_data, 2.0)
         self.assertLessEqual(out_data, 4.0)
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/tests/modules/test_control.py b/tests/modules/test_control.py
index 6c064d571640cdd4e2f7cc1b64938f790d750107..0fb3493060c7fd198d90a93b77fc5a3aaa303f11 100644
--- a/tests/modules/test_control.py
+++ b/tests/modules/test_control.py
@@ -208,3 +208,7 @@ class TestTimeTrigger(unittest.TestCase):
         )
         with self.assertRaises(fm.FinamMetaDataError):
             trigger.initialize()
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/tests/modules/test_csv_writer.py b/tests/modules/test_csv_writer.py
index b200f4825f3553b0dad89e4a0f0101ec54a14bda..d9570f919ecf5e17435f6f33b5d3984c194acf93 100644
--- a/tests/modules/test_csv_writer.py
+++ b/tests/modules/test_csv_writer.py
@@ -68,3 +68,7 @@ class TestCsvWriter(unittest.TestCase):
                 step=1,
                 separator=",",
             )
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/tests/modules/test_debug.py b/tests/modules/test_debug.py
index 7140e682ee5fe05544a1cf6b24746670843b664c..2986f74e78b2dff4946bada54acb5bd842987f5b 100644
--- a/tests/modules/test_debug.py
+++ b/tests/modules/test_debug.py
@@ -90,3 +90,7 @@ class TestPushDebugConsumer(unittest.TestCase):
         composition.run(start_time=start, end_time=datetime(2000, 1, 10))
 
         self.assertEqual(consumer.data["In"][0, ...], 11)
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/tests/modules/test_generator.py b/tests/modules/test_generator.py
index cada5a3973c01546f804a296aa7422695ff735cf..10f97110f376626eec333a09c9d328b2726154a7 100644
--- a/tests/modules/test_generator.py
+++ b/tests/modules/test_generator.py
@@ -42,3 +42,7 @@ class TestStaticCallbackGenerator(unittest.TestCase):
 
         out_data_2 = consumer.data["In1"]
         self.assertEqual(out_data_1, out_data_2)
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/tests/modules/test_noise.py b/tests/modules/test_noise.py
index 1366134fe3ea8eeb724b14c6550922669d2a80a1..73fe1ba79dfd2f8352b7142f154b5c8abe196d3b 100644
--- a/tests/modules/test_noise.py
+++ b/tests/modules/test_noise.py
@@ -298,3 +298,7 @@ class TestStaticNoise(unittest.TestCase):
         data_2 = sink.data["Input"][0, ...]
         self.assertEqual(data_1, data_2)
         self.assertEqual(data_2.shape, ())
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/tests/modules/test_parametric.py b/tests/modules/test_parametric.py
index 10a8ac5a4e1f6bdb3aa14a3f2b4056cadcb85399..3462fd2dd222da6d176a618f386f3aab3451aa64 100644
--- a/tests/modules/test_parametric.py
+++ b/tests/modules/test_parametric.py
@@ -286,3 +286,7 @@ class TestStaticParametricGrid(unittest.TestCase):
         data_2 = sink.data["Input"][0, ...]
         assert_allclose(data_1.magnitude, data_2.magnitude)
         self.assertEqual(data_2.shape, (19, 14))
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/tests/modules/test_simplex_noise.py b/tests/modules/test_simplex_noise.py
index ea3f2af98cac3f794bef53bc495fcbefe6020fb7..511beea5a2cd524590a4ed3b977b5415074780b2 100644
--- a/tests/modules/test_simplex_noise.py
+++ b/tests/modules/test_simplex_noise.py
@@ -49,3 +49,7 @@ class TestSimplexNoise(unittest.TestCase):
         composition.run(end_time=datetime(2000, 3, 1))
 
         print(consumer.data["Noise"])
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/tests/modules/test_weighted_sum.py b/tests/modules/test_weighted_sum.py
index d934bb2b0f7c1bdf3ed9f13ea6e63e20d80d2508..f905981999fb64e909e4587cb918239bd4735232 100644
--- a/tests/modules/test_weighted_sum.py
+++ b/tests/modules/test_weighted_sum.py
@@ -342,3 +342,7 @@ class TestWeightedSum(unittest.TestCase):
 
         with self.assertRaises(finam.errors.FinamMetaDataError):
             composition.run(start_time=start, end_time=start + timedelta(days=30))
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/tests/tools/test_connect.py b/tests/tools/test_connect.py
index 56a7a7ee68c553bccfbad546c8a3a7d319c36187..6ba4c10b46107d5c6a766dd52412cc26846afbdd 100644
--- a/tests/tools/test_connect.py
+++ b/tests/tools/test_connect.py
@@ -414,3 +414,7 @@ class TestConnectHelper(unittest.TestCase):
             connector.connect(
                 start_time=None, push_infos={"Out1": Info(time=None, grid=NoGrid())}
             )
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/tests/tools/test_cwd.py b/tests/tools/test_cwd.py
index 2756f06644eb948ea1ae13389c1372a6a042239a..0ce763feab08ea5a00269abdf16b9a5f5f1f89be 100644
--- a/tests/tools/test_cwd.py
+++ b/tests/tools/test_cwd.py
@@ -28,3 +28,7 @@ class TestCWD(unittest.TestCase):
         self.assertEqual(Path(test2.cwd).resolve(), Path(test2.new_cwd).resolve())
         self.assertEqual(Path(".").resolve(), Path(cwd).resolve())
         self.assertNotEqual(Path(".").resolve(), Path(test2.cwd).resolve())
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/tests/tools/test_inspect.py b/tests/tools/test_inspect.py
index e0576c4748de6e11f33c1262da147138cea51c63..919422b23b8401ea97c5b952bada1151cd8781f8 100644
--- a/tests/tools/test_inspect.py
+++ b/tests/tools/test_inspect.py
@@ -28,3 +28,7 @@ class TestInspect(unittest.TestCase):
 
         _s1 = fm.tools.inspect(comp1)
         _s2 = fm.tools.inspect(comp2)
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/tests/tools/test_log.py b/tests/tools/test_log.py
index 0e5701610adbe5f614b80d98226deb86615c4f8f..1663cd0c8c82c90c90f5919da409e05df8880d0b 100644
--- a/tests/tools/test_log.py
+++ b/tests/tools/test_log.py
@@ -58,3 +58,7 @@ class TestLog(unittest.TestCase):
         self.assertEqual(len(captured.records), 1)
         self.assertEqual(captured.records[0].levelno, logging.INFO)
         self.assertEqual(captured.records[0].message, "Hi from C")
+
+
+if __name__ == "__main__":
+    unittest.main()