Merge branch 'vtr-to-vti' into 'development'

don't use deprecated functions

See merge request damask/DAMASK!488
This commit is contained in:
Philip Eisenlohr 2021-12-24 23:06:04 +00:00
commit d8ef23fc91
1 changed files with 3 additions and 3 deletions

View File

@ -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')