fixed remnant occurrences of .write() --> .to_file()
This commit is contained in:
parent
6785062a10
commit
d645849baf
|
@ -94,7 +94,7 @@ class TestVTK:
|
||||||
|
|
||||||
def test_invalid_extension_write(self,default):
|
def test_invalid_extension_write(self,default):
|
||||||
with pytest.raises(ValueError):
|
with pytest.raises(ValueError):
|
||||||
default.write('default.txt')
|
default.to_file('default.txt')
|
||||||
|
|
||||||
def test_invalid_get(self,default):
|
def test_invalid_get(self,default):
|
||||||
with pytest.raises(ValueError):
|
with pytest.raises(ValueError):
|
||||||
|
@ -115,7 +115,7 @@ class TestVTK:
|
||||||
|
|
||||||
def test_comments(self,tmp_path,default):
|
def test_comments(self,tmp_path,default):
|
||||||
default.add_comments(['this is a comment'])
|
default.add_comments(['this is a comment'])
|
||||||
default.write(tmp_path/'with_comments',parallel=False)
|
default.to_file(tmp_path/'with_comments',parallel=False)
|
||||||
new = VTK.from_file(tmp_path/'with_comments.vtr')
|
new = VTK.from_file(tmp_path/'with_comments.vtr')
|
||||||
assert new.get_comments() == ['this is a comment']
|
assert new.get_comments() == ['this is a comment']
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ class TestVTK:
|
||||||
polyData = VTK.from_polyData(points)
|
polyData = VTK.from_polyData(points)
|
||||||
polyData.add(points,'coordinates')
|
polyData.add(points,'coordinates')
|
||||||
if update:
|
if update:
|
||||||
polyData.write(reference_dir/'polyData')
|
polyData.to_file(reference_dir/'polyData')
|
||||||
else:
|
else:
|
||||||
reference = VTK.from_file(reference_dir/'polyData.vtp')
|
reference = VTK.from_file(reference_dir/'polyData.vtp')
|
||||||
assert polyData.__repr__() == reference.__repr__() and \
|
assert polyData.__repr__() == reference.__repr__() and \
|
||||||
|
@ -139,7 +139,7 @@ class TestVTK:
|
||||||
rectilinearGrid.add(c,'cell')
|
rectilinearGrid.add(c,'cell')
|
||||||
rectilinearGrid.add(n,'node')
|
rectilinearGrid.add(n,'node')
|
||||||
if update:
|
if update:
|
||||||
rectilinearGrid.write(reference_dir/'rectilinearGrid')
|
rectilinearGrid.to_file(reference_dir/'rectilinearGrid')
|
||||||
else:
|
else:
|
||||||
reference = VTK.from_file(reference_dir/'rectilinearGrid.vtr')
|
reference = VTK.from_file(reference_dir/'rectilinearGrid.vtr')
|
||||||
assert rectilinearGrid.__repr__() == reference.__repr__() and \
|
assert rectilinearGrid.__repr__() == reference.__repr__() and \
|
||||||
|
|
Loading…
Reference in New Issue