simple IO tests

can be improved ...
This commit is contained in:
Martin Diehl 2020-08-08 20:35:50 +02:00
parent 6a5471d243
commit 0c6ce390b5
1 changed files with 18 additions and 8 deletions

View File

@ -63,6 +63,16 @@ class TestGeom:
new = Geom.from_file(f)
assert geom_equal(new,default)
def test_write_show(self,default,tmpdir):
with open(tmpdir.join('str.geom'),'w') as f:
f.write(default.show())
with open(tmpdir.join('str.geom')) as f:
new = Geom.from_file(f)
assert geom_equal(new,default)
def test_export_vtk(self,default,tmpdir):
default.to_vtk(str(tmpdir.join('default')))
@pytest.mark.parametrize('pack',[True,False])
def test_pack(self,default,tmpdir,pack):
default.to_file(tmpdir.join('default.geom'),pack=pack)