From dc5172ce6351450f5d220ad65a946875ca921ebc Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Wed, 22 Dec 2021 12:41:16 +0100 Subject: [PATCH] don't use deprecated functions --- python/tests/test_VTK.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/tests/test_VTK.py b/python/tests/test_VTK.py index 26d1c4a53..68224ff33 100644 --- a/python/tests/test_VTK.py +++ b/python/tests/test_VTK.py @@ -20,7 +20,7 @@ def default(): """Simple VTK.""" cells = np.array([5,6,7],int) size = np.array([.6,1.,.5]) - return VTK.from_rectilinear_grid(cells,size) + return VTK.from_image_data(cells,size) class TestVTK: @@ -116,7 +116,7 @@ class TestVTK: def test_add_extension(self,tmp_path,default): default.save(tmp_path/'default.txt',parallel=False) - assert os.path.isfile(tmp_path/'default.txt.vtr') + assert os.path.isfile(tmp_path/'default.txt.vti') def test_invalid_get(self,default): @@ -160,7 +160,7 @@ class TestVTK: def test_comments(self,tmp_path,default): default.add_comments(['this is a comment']) default.save(tmp_path/'with_comments',parallel=False) - new = VTK.load(tmp_path/'with_comments.vtr') + new = VTK.load(tmp_path/'with_comments.vti') assert new.get_comments() == ['this is a comment'] @pytest.mark.xfail(int(vtk.vtkVersion.GetVTKVersion().split('.')[0])<8, reason='missing METADATA')