Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
b014de01
Kaydet (Commit)
b014de01
authored
May 04, 2017
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Removed obsolete HAS_GEOS variable for test skipping.
üst
2dc32802
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
32 deletions
+16
-32
__init__.py
django/contrib/gis/geos/__init__.py
+0
-5
test_geos.py
tests/gis_tests/geos_tests/test_geos.py
+4
-5
test_geos_mutation.py
tests/gis_tests/geos_tests/test_geos_mutation.py
+1
-3
test_io.py
tests/gis_tests/geos_tests/test_io.py
+1
-4
tests.py
tests/gis_tests/layermap/tests.py
+9
-13
test_geoip2.py
tests/gis_tests/test_geoip2.py
+1
-2
No files found.
django/contrib/gis/geos/__init__.py
Dosyayı görüntüle @
b014de01
...
@@ -13,8 +13,3 @@ from .libgeos import geos_version, geos_version_info # NOQA
...
@@ -13,8 +13,3 @@ from .libgeos import geos_version, geos_version_info # NOQA
from
.linestring
import
LinearRing
,
LineString
# NOQA
from
.linestring
import
LinearRing
,
LineString
# NOQA
from
.point
import
Point
# NOQA
from
.point
import
Point
# NOQA
from
.polygon
import
Polygon
# NOQA
from
.polygon
import
Polygon
# NOQA
try
:
HAS_GEOS
=
geos_version_info
()[
'version'
]
>=
'3.3.0'
except
ImportError
:
HAS_GEOS
=
False
tests/gis_tests/geos_tests/test_geos.py
Dosyayı görüntüle @
b014de01
...
@@ -4,13 +4,13 @@ import pickle
...
@@ -4,13 +4,13 @@ import pickle
import
random
import
random
from
binascii
import
a2b_hex
,
b2a_hex
from
binascii
import
a2b_hex
,
b2a_hex
from
io
import
BytesIO
from
io
import
BytesIO
from
unittest
import
mock
,
skipUnless
from
unittest
import
mock
from
django.contrib.gis
import
gdal
from
django.contrib.gis
import
gdal
from
django.contrib.gis.geos
import
(
from
django.contrib.gis.geos
import
(
HAS_GEOS
,
GeometryCollection
,
GEOSException
,
GEOSGeometry
,
LinearR
ing
,
GeometryCollection
,
GEOSException
,
GEOSGeometry
,
LinearRing
,
LineStr
ing
,
LineString
,
MultiLineString
,
MultiPoint
,
MultiPolygon
,
Point
,
Polygon
,
MultiLineString
,
MultiPoint
,
MultiPolygon
,
Point
,
Polygon
,
fromfile
,
from
file
,
from
str
,
fromstr
,
)
)
from
django.contrib.gis.geos.libgeos
import
geos_version_info
from
django.contrib.gis.geos.libgeos
import
geos_version_info
from
django.contrib.gis.shortcuts
import
numpy
from
django.contrib.gis.shortcuts
import
numpy
...
@@ -22,7 +22,6 @@ from django.utils.encoding import force_bytes
...
@@ -22,7 +22,6 @@ from django.utils.encoding import force_bytes
from
..test_data
import
TestDataMixin
from
..test_data
import
TestDataMixin
@skipUnless
(
HAS_GEOS
,
"Geos is required."
)
class
GEOSTest
(
SimpleTestCase
,
TestDataMixin
):
class
GEOSTest
(
SimpleTestCase
,
TestDataMixin
):
def
test_wkt
(
self
):
def
test_wkt
(
self
):
...
...
tests/gis_tests/geos_tests/test_geos_mutation.py
Dosyayı görüntüle @
b014de01
...
@@ -3,10 +3,9 @@
...
@@ -3,10 +3,9 @@
# released under the New BSD license.
# released under the New BSD license.
import
unittest
import
unittest
from
unittest
import
skipUnless
from
django.contrib.gis.geos
import
(
from
django.contrib.gis.geos
import
(
HAS_GEOS
,
LinearRing
,
LineString
,
MultiPoint
,
Point
,
Polygon
,
fromstr
,
LinearRing
,
LineString
,
MultiPoint
,
Point
,
Polygon
,
fromstr
,
)
)
...
@@ -72,7 +71,6 @@ geos_function_tests = [
...
@@ -72,7 +71,6 @@ geos_function_tests = [
]
]
@skipUnless
(
HAS_GEOS
,
"Geos is required."
)
class
GEOSMutationTest
(
unittest
.
TestCase
):
class
GEOSMutationTest
(
unittest
.
TestCase
):
"""
"""
Tests Pythonic Mutability of Python GEOS geometry wrappers
Tests Pythonic Mutability of Python GEOS geometry wrappers
...
...
tests/gis_tests/geos_tests/test_io.py
Dosyayı görüntüle @
b014de01
import
binascii
import
binascii
from
unittest
import
skipUnless
from
django.contrib.gis.geos
import
(
from
django.contrib.gis.geos
import
(
HAS_GEOS
,
GEOSGeometry
,
Point
,
Polygon
,
WKBReader
,
WKBWriter
,
WKTReader
,
GEOSGeometry
,
Point
,
Polygon
,
WKBReader
,
WKBWriter
,
WKTReader
,
WKTWriter
,
WKTWriter
,
)
)
from
django.test
import
SimpleTestCase
from
django.test
import
SimpleTestCase
@skipUnless
(
HAS_GEOS
,
"Geos is required."
)
class
GEOSIOTest
(
SimpleTestCase
):
class
GEOSIOTest
(
SimpleTestCase
):
def
test01_wktreader
(
self
):
def
test01_wktreader
(
self
):
...
...
tests/gis_tests/layermap/tests.py
Dosyayı görüntüle @
b014de01
...
@@ -4,22 +4,18 @@ from copy import copy
...
@@ -4,22 +4,18 @@ from copy import copy
from
decimal
import
Decimal
from
decimal
import
Decimal
from
django.conf
import
settings
from
django.conf
import
settings
from
django.contrib.gis.geos
import
HAS_GEOS
from
django.contrib.gis.gdal
import
DataSource
from
django.contrib.gis.utils.layermapping
import
(
InvalidDecimal
,
InvalidString
,
LayerMapError
,
LayerMapping
,
MissingForeignKey
,
)
from
django.db
import
connection
from
django.db
import
connection
from
django.test
import
TestCase
,
override_settings
from
django.test
import
TestCase
,
override_settings
if
HAS_GEOS
:
from
.models
import
(
from
django.contrib.gis.utils.layermapping
import
(
City
,
County
,
CountyFeat
,
ICity1
,
ICity2
,
Interstate
,
Invalid
,
State
,
LayerMapping
,
LayerMapError
,
InvalidDecimal
,
InvalidString
,
city_mapping
,
co_mapping
,
cofeat_mapping
,
inter_mapping
,
MissingForeignKey
,
)
)
from
django.contrib.gis.gdal
import
DataSource
from
.models
import
(
City
,
County
,
CountyFeat
,
Interstate
,
ICity1
,
ICity2
,
Invalid
,
State
,
city_mapping
,
co_mapping
,
cofeat_mapping
,
inter_mapping
,
)
shp_path
=
os
.
path
.
realpath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
os
.
pardir
,
'data'
))
shp_path
=
os
.
path
.
realpath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
os
.
pardir
,
'data'
))
city_shp
=
os
.
path
.
join
(
shp_path
,
'cities'
,
'cities.shp'
)
city_shp
=
os
.
path
.
join
(
shp_path
,
'cities'
,
'cities.shp'
)
...
...
tests/gis_tests/test_geoip2.py
Dosyayı görüntüle @
b014de01
...
@@ -4,7 +4,7 @@ from unittest import mock, skipUnless
...
@@ -4,7 +4,7 @@ from unittest import mock, skipUnless
from
django.conf
import
settings
from
django.conf
import
settings
from
django.contrib.gis.geoip2
import
HAS_GEOIP2
from
django.contrib.gis.geoip2
import
HAS_GEOIP2
from
django.contrib.gis.geos
import
HAS_GEOS
,
GEOSGeometry
from
django.contrib.gis.geos
import
GEOSGeometry
if
HAS_GEOIP2
:
if
HAS_GEOIP2
:
from
django.contrib.gis.geoip2
import
GeoIP2
,
GeoIP2Exception
from
django.contrib.gis.geoip2
import
GeoIP2
,
GeoIP2Exception
...
@@ -90,7 +90,6 @@ class GeoIPTest(unittest.TestCase):
...
@@ -90,7 +90,6 @@ class GeoIPTest(unittest.TestCase):
g
.
country
(
query
)
g
.
country
(
query
)
)
)
@skipUnless
(
HAS_GEOS
,
"Geos is required"
)
@mock.patch
(
'socket.gethostbyname'
)
@mock.patch
(
'socket.gethostbyname'
)
def
test04_city
(
self
,
gethostbyname
):
def
test04_city
(
self
,
gethostbyname
):
"GeoIP city querying methods."
"GeoIP city querying methods."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment