From 068177b89837e0e0ce40bf2d9e9ad9d0a47a7945 Mon Sep 17 00:00:00 2001 From: Brett Date: Tue, 2 Jan 2024 16:02:15 -0500 Subject: [PATCH] fix test that relied on slow garbage collection --- weldx/tests/asdf_tests/test_weldx_file.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/weldx/tests/asdf_tests/test_weldx_file.py b/weldx/tests/asdf_tests/test_weldx_file.py index b6bc588c5..863159abf 100644 --- a/weldx/tests/asdf_tests/test_weldx_file.py +++ b/weldx/tests/asdf_tests/test_weldx_file.py @@ -449,7 +449,8 @@ def get_mem_info(): # pytest increases memory a bit, but not as much as our large array would # occupy in memory. assert diff <= large_array.nbytes * 1.1, diff / 1024**2 - assert np.all(WeldxFile(fn)["x"] == large_array) + with WeldxFile(fn) as wf: + assert np.all(wf["x"] == large_array) @staticmethod @pytest.mark.parametrize("mode", ("r", "rw"))