avoid repetitions

This commit is contained in:
Martin Diehl 2019-11-25 12:04:57 +01:00
parent 6d25506204
commit b757f02649
1 changed files with 3 additions and 7 deletions

View File

@ -51,13 +51,9 @@ class TestGeom:
new = Geom.from_file(f)
assert geom_equal(new,default)
def test_pack(self,default,tmpdir):
default.to_file(tmpdir.join('default.geom'),pack=True)
new = Geom.from_file(tmpdir.join('default.geom'))
assert geom_equal(new,default)
def test_plain(self,default,tmpdir):
default.to_file(tmpdir.join('default.geom'),pack=False)
@pytest.mark.parametrize('pack',[True,False])
def test_pack(self,default,tmpdir,pack):
default.to_file(tmpdir.join('default.geom'),pack=pack)
new = Geom.from_file(tmpdir.join('default.geom'))
assert geom_equal(new,default)