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
1b598b4b
Kaydet (Commit)
1b598b4b
authored
Kas 02, 2015
tarafından
Sergey Fedoseev
Kaydeden (comit)
Claude Paroz
Kas 02, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #25661 -- Fixed checking number of points during list assignment for `LinearRing`.
üst
0a261217
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
1 deletion
+33
-1
linestring.py
django/contrib/gis/geos/linestring.py
+1
-1
test_geos.py
tests/gis_tests/geos_tests/test_geos.py
+32
-0
No files found.
django/contrib/gis/geos/linestring.py
Dosyayı görüntüle @
1b598b4b
...
@@ -167,5 +167,5 @@ class LineString(ProjectInterpolateMixin, GEOSGeometry):
...
@@ -167,5 +167,5 @@ class LineString(ProjectInterpolateMixin, GEOSGeometry):
# LinearRings are LineStrings used within Polygons.
# LinearRings are LineStrings used within Polygons.
class
LinearRing
(
LineString
):
class
LinearRing
(
LineString
):
_min
L
ength
=
4
_min
l
ength
=
4
_init_func
=
capi
.
create_linearring
_init_func
=
capi
.
create_linearring
tests/gis_tests/geos_tests/test_geos.py
Dosyayı görüntüle @
1b598b4b
...
@@ -748,6 +748,38 @@ class GEOSTest(unittest.TestCase, TestDataMixin):
...
@@ -748,6 +748,38 @@ class GEOSTest(unittest.TestCase, TestDataMixin):
# self.assertEqual((3.14, 2.71), mpoly[0].shell[0])
# self.assertEqual((3.14, 2.71), mpoly[0].shell[0])
# del mpoly
# del mpoly
def
test_point_list_assignment
(
self
):
p
=
Point
(
0
,
0
)
p
[:]
=
(
1
,
2
,
3
)
self
.
assertEqual
(
p
,
Point
(
1
,
2
,
3
))
p
[:]
=
(
1
,
2
)
self
.
assertEqual
(
p
.
wkt
,
Point
(
1
,
2
))
with
self
.
assertRaises
(
ValueError
):
p
[:]
=
(
1
,)
with
self
.
assertRaises
(
ValueError
):
p
[:]
=
(
1
,
2
,
3
,
4
,
5
)
def
test_linestring_list_assignment
(
self
):
ls
=
LineString
((
0
,
0
),
(
1
,
1
))
ls
[:]
=
((
0
,
0
),
(
1
,
1
),
(
2
,
2
))
self
.
assertEqual
(
ls
,
LineString
((
0
,
0
),
(
1
,
1
),
(
2
,
2
)))
with
self
.
assertRaises
(
ValueError
):
ls
[:]
=
(
1
,)
def
test_linearring_list_assignment
(
self
):
ls
=
LinearRing
((
0
,
0
),
(
0
,
1
),
(
1
,
1
),
(
0
,
0
))
ls
[:]
=
((
0
,
0
),
(
0
,
1
),
(
1
,
1
),
(
1
,
0
),
(
0
,
0
))
self
.
assertEqual
(
ls
,
LinearRing
((
0
,
0
),
(
0
,
1
),
(
1
,
1
),
(
1
,
0
),
(
0
,
0
)))
with
self
.
assertRaises
(
ValueError
):
ls
[:]
=
((
0
,
0
),
(
1
,
1
),
(
2
,
2
))
def
test_threed
(
self
):
def
test_threed
(
self
):
"Testing three-dimensional geometries."
"Testing three-dimensional geometries."
# Testing a 3D Point
# Testing a 3D Point
...
...
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