fixed remnant occurrences of .write() --> .to_file()

This commit is contained in:
Philip Eisenlohr 2020-09-02 11:32:40 -04:00
parent 6785062a10
commit d645849baf
1 changed files with 4 additions and 4 deletions

View File

@ -94,7 +94,7 @@ class TestVTK:
def test_invalid_extension_write(self,default):
with pytest.raises(ValueError):
default.write('default.txt')
default.to_file('default.txt')
def test_invalid_get(self,default):
with pytest.raises(ValueError):
@ -115,7 +115,7 @@ class TestVTK:
def test_comments(self,tmp_path,default):
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')
assert new.get_comments() == ['this is a comment']
@ -124,7 +124,7 @@ class TestVTK:
polyData = VTK.from_polyData(points)
polyData.add(points,'coordinates')
if update:
polyData.write(reference_dir/'polyData')
polyData.to_file(reference_dir/'polyData')
else:
reference = VTK.from_file(reference_dir/'polyData.vtp')
assert polyData.__repr__() == reference.__repr__() and \
@ -139,7 +139,7 @@ class TestVTK:
rectilinearGrid.add(c,'cell')
rectilinearGrid.add(n,'node')
if update:
rectilinearGrid.write(reference_dir/'rectilinearGrid')
rectilinearGrid.to_file(reference_dir/'rectilinearGrid')
else:
reference = VTK.from_file(reference_dir/'rectilinearGrid.vtr')
assert rectilinearGrid.__repr__() == reference.__repr__() and \