correct order (brackets)
This commit is contained in:
parent
68d384bbdd
commit
30938a8278
|
@ -199,7 +199,7 @@ class VTK:
|
||||||
|
|
||||||
default_ext = '.'+writer.GetDefaultFileExtension()
|
default_ext = '.'+writer.GetDefaultFileExtension()
|
||||||
ext = Path(fname).suffix
|
ext = Path(fname).suffix
|
||||||
writer.SetFileName(str(fname)+default_ext if default_ext != ext else '')
|
writer.SetFileName(str(fname)+(default_ext if default_ext != ext else ''))
|
||||||
|
|
||||||
if compress:
|
if compress:
|
||||||
writer.SetCompressorTypeToZLib()
|
writer.SetCompressorTypeToZLib()
|
||||||
|
|
|
@ -98,9 +98,10 @@ class TestVTK:
|
||||||
with pytest.raises(TypeError):
|
with pytest.raises(TypeError):
|
||||||
VTK.load(name,dataset_type)
|
VTK.load(name,dataset_type)
|
||||||
|
|
||||||
def test_invalid_extension_write(self,default):
|
def test_add_extension(self,tmp_path,default):
|
||||||
with pytest.raises(ValueError):
|
default.save(tmp_path/'default.txt',parallel=False)
|
||||||
default.save('default.txt')
|
assert os.path.isfile(tmp_path/'default.txt.vtr')
|
||||||
|
|
||||||
|
|
||||||
def test_invalid_get(self,default):
|
def test_invalid_get(self,default):
|
||||||
with pytest.raises(ValueError):
|
with pytest.raises(ValueError):
|
||||||
|
|
Loading…
Reference in New Issue