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"))