Un-gzipped test geometries fixture as plain json

This is easier to track changes through the VCS.
This commit is contained in:
Claude Paroz 2012-10-06 14:40:00 +02:00
parent 117e99511e
commit 8a2216648f
3 changed files with 123 additions and 3 deletions

View File

@ -2,7 +2,6 @@
This module has the mock object definitions used to hold reference geometry This module has the mock object definitions used to hold reference geometry
for the GEOS and GDAL tests. for the GEOS and GDAL tests.
""" """
import gzip
import json import json
import os import os
@ -100,7 +99,7 @@ class TestDataMixin(object):
global GEOMETRIES global GEOMETRIES
if GEOMETRIES is None: if GEOMETRIES is None:
# Load up the test geometry data from fixture into global. # Load up the test geometry data from fixture into global.
gzf = gzip.GzipFile(os.path.join(TEST_DATA, 'geometries.json.gz')) with open(os.path.join(TEST_DATA, 'geometries.json')) as f:
geometries = json.loads(gzf.read().decode()) geometries = json.load(f)
GEOMETRIES = TestGeomSet(**strconvert(geometries)) GEOMETRIES = TestGeomSet(**strconvert(geometries))
return GEOMETRIES return GEOMETRIES

File diff suppressed because one or more lines are too long