don't use deprecated functions
This commit is contained in:
parent
3e01f72daa
commit
dc5172ce63
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue