diff --git a/modelx/tests/core/cells/test_node_repr.py b/modelx/tests/core/cells/test_node_repr.py
index <HASH>..<HASH> 100644
--- a/modelx/tests/core/cells/test_node_repr.py
+++ b/modelx/tests/core/cells/test_node_repr.py
@@ -22,7 +22,8 @@ def no_values():
     def param2(x, y):
         return x * y
 
-    return space
+    yield space
+    model.close()
 
 
 @pytest.fixture
TST: Add teardown code in fixture