Explorar o código

Un-gzipped test geometries fixture as plain json

This is easier to track changes through the VCS.
Claude Paroz %!s(int64=12) %!d(string=hai) anos
pai
achega
8a2216648f

+ 2 - 3
django/contrib/gis/geometry/test_data.py

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

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 5 - 0
django/contrib/gis/tests/data/geometries.json


BIN=BIN
django/contrib/gis/tests/data/geometries.json.gz


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio