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) new = Geom.from_file(f)
assert geom_equal(new,default) assert geom_equal(new,default)
def test_pack(self,default,tmpdir): @pytest.mark.parametrize('pack',[True,False])
default.to_file(tmpdir.join('default.geom'),pack=True) def test_pack(self,default,tmpdir,pack):
new = Geom.from_file(tmpdir.join('default.geom')) default.to_file(tmpdir.join('default.geom'),pack=pack)
assert geom_equal(new,default)
def test_plain(self,default,tmpdir):
default.to_file(tmpdir.join('default.geom'),pack=False)
new = Geom.from_file(tmpdir.join('default.geom')) new = Geom.from_file(tmpdir.join('default.geom'))
assert geom_equal(new,default) assert geom_equal(new,default)