diff --git a/pystencils_tests/test_address_of.py b/pystencils_tests/test_address_of.py
index c31091cee2819a1a9a8fc7db851c51a9afec5be9..9aac08d107f3fc1fc69703cb7f348b28fb516f65 100644
--- a/pystencils_tests/test_address_of.py
+++ b/pystencils_tests/test_address_of.py
@@ -31,7 +31,6 @@ def test_address_of():
 
 def test_address_of_with_cse():
     x, y = pystencils.fields('x,y: int64[2d]')
-    s = pystencils.TypedSymbol('s', PointerType('int64'))
 
     assignments = pystencils.AssignmentCollection({
         y[0, 0]: cast_func(address_of(x[0, 0]), 'int64'),
diff --git a/pystencils_tests/test_assignment_collection_dict_conversion.py b/pystencils_tests/test_assignment_collection_dict_conversion.py
index 651e0a21275c25d6af54db918ecb33397dd1d898..16d38de8244ccbd6bcb5f4aceec93b4fd44f869e 100644
--- a/pystencils_tests/test_assignment_collection_dict_conversion.py
+++ b/pystencils_tests/test_assignment_collection_dict_conversion.py
@@ -30,11 +30,3 @@ def test_assignment_collection_dict_conversion():
     assert collection_dict.main_assignments_dict == {y[1, 0]: x.center(),
                                                      y[0, 0]: x.center()}
     assert collection_dict.subexpressions_dict == {}
-
-
-def main():
-    test_assignment_collection_dict_conversion()
-
-
-if __name__ == '__main__':
-    main()
diff --git a/pystencils_tests/test_cuda_known_functions.py b/pystencils_tests/test_cuda_known_functions.py
index 5742a3262806d60024824994d2baf28ae6f2d8ec..cd0304f8f14f2d6a120194e138ac8ccb938633dd 100644
--- a/pystencils_tests/test_cuda_known_functions.py
+++ b/pystencils_tests/test_cuda_known_functions.py
@@ -47,13 +47,3 @@ def test_cuda_unknown():
     code = str(pystencils.show_code(ast))
     print(code)
     assert "Not supported in CUDA" in code
-
-
-def main():
-    test_cuda_known_functions()
-    test_cuda_but_not_c()
-    test_cuda_unknown()
-
-
-if __name__ == '__main__':
-    main()
diff --git a/pystencils_tests/test_custom_backends.py b/pystencils_tests/test_custom_backends.py
index 0a018683a7b02575c2d93d0f19b0f65498e41e23..1ff775d41355b79c1714a935125f27c261045011 100644
--- a/pystencils_tests/test_custom_backends.py
+++ b/pystencils_tests/test_custom_backends.py
@@ -40,11 +40,3 @@ def test_custom_backends():
     print(pystencils.show_code(ast, ScreamingGpuBackend()))
     with pytest.raises(pycuda.driver.CompileError):
         pystencils.gpucuda.cudajit.make_python_function(ast, custom_backend=ScreamingGpuBackend())
-
-
-def main():
-    test_custom_backends()
-
-
-if __name__ == "__main__":
-    main()
diff --git a/pystencils_tests/test_destructuring_field_class.py b/pystencils_tests/test_destructuring_field_class.py
index fb15068cdac0d41ce7c7a8fc3d32510f7c5da8c6..4b9faf63277e7c00f469b10ea59f7d629baae41e 100644
--- a/pystencils_tests/test_destructuring_field_class.py
+++ b/pystencils_tests/test_destructuring_field_class.py
@@ -41,12 +41,3 @@ def test_destructuring_alternative_field_class():
     ast = pystencils.create_kernel(normal_assignments, target='gpu')
     ast.body = DestructuringEmojiClass(ast.body)
     print(pystencils.show_code(ast))
-
-
-def main():
-    test_destructuring_field_class()
-    test_destructuring_alternative_field_class()
-
-
-if __name__ == '__main__':
-    main()
diff --git a/pystencils_tests/test_floor_ceil_int_optimization.py b/pystencils_tests/test_floor_ceil_int_optimization.py
index 2d6efba7b1431a8f47c0dfe317d48ff9bff7b9a2..7ec81b05baa07cf1da80ca24060c0c5e57adcc23 100644
--- a/pystencils_tests/test_floor_ceil_int_optimization.py
+++ b/pystencils_tests/test_floor_ceil_int_optimization.py
@@ -64,12 +64,3 @@ def test_floor_ceil_float_no_optimization():
     assert sp.floor(a).match(wild_floor)
 
     assert assignments.find(wild_floor)
-
-
-def main():
-    test_floor_ceil_int_optimization()
-    test_floor_ceil_float_no_optimization()
-
-
-if __name__ == '__main__':
-    main()
diff --git a/pystencils_tests/test_global_definitions.py b/pystencils_tests/test_global_definitions.py
index 01c04442703436d3c2a6659c257c8a396ceaeda1..52def8c6b4300ef5afdeab617ac1b0807562f5c3 100644
--- a/pystencils_tests/test_global_definitions.py
+++ b/pystencils_tests/test_global_definitions.py
@@ -125,12 +125,3 @@ def test_global_definitions_without_global_symbol():
     assert kernel is not None
 
     assert TypedSymbol('Foo', 'double') in [p.symbol for p in ast.get_parameters()]
-
-
-def main():
-    test_global_definitions_with_global_symbol()
-    test_global_definitions_without_global_symbol()
-
-
-if __name__ == '__main__':
-    main()
diff --git a/pystencils_tests/test_match_subs_for_assignment_collection.py b/pystencils_tests/test_match_subs_for_assignment_collection.py
index 81dec872d115f3b04876845dcfff040894bd5353..9bcc5ad6b5c174bd2b34e28e5b11785b68b8e148 100644
--- a/pystencils_tests/test_match_subs_for_assignment_collection.py
+++ b/pystencils_tests/test_match_subs_for_assignment_collection.py
@@ -87,13 +87,3 @@ def test_match_for_assignment_collection():
     }
     assert assignments.find(wild_ceiling) == {sp.ceiling(x.center())}
     assert len([a for a in assignments.find(wild_addition) if isinstance(a, sp.Add)]) == 2
-
-
-def main():
-    test_wild_typed_symbol()
-    test_replace_and_subs_for_assignment_collection()
-    test_match_for_assignment_collection()
-
-
-if __name__ == '__main__':
-    main()
diff --git a/pystencils_tests/test_print_unsupported_node.py b/pystencils_tests/test_print_unsupported_node.py
index 16cf6739ccb49ed1064950a4549ef1391b68f9f6..674a7b390512a4d7d12d1a733fbd759a460499d8 100644
--- a/pystencils_tests/test_print_unsupported_node.py
+++ b/pystencils_tests/test_print_unsupported_node.py
@@ -22,11 +22,3 @@ class UnsupportedNode(pystencils.astnodes.Node):
 def test_print_unsupported_node():
     with pytest.raises(NotImplementedError, match='CBackend does not support node of type UnsupportedNode'):
         CBackend()(UnsupportedNode())
-
-
-def main():
-    test_print_unsupported_node()
-
-
-if __name__ == '__main__':
-    main()