https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /usr/lib64/python2.7/site-packages/django/contrib/gis/tests/geogapp/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.7/site-packages/django/contrib/gis/tests/geogapp/tests.pyc
�
r�\c@@s�dZddlmZddlZddlmZddlmZddlm	Z	ddl
mZddlm
Z
dd	lmZdd
lmZer�ddlmZmZmZneeo�ed
�de
fd��Y�ZdS(s-
Tests for geography support in PostGIS 1.5+
i(tabsolute_importN(tHAS_GDAL(tHAS_GEOS(tD(tpostgis(tTestCase(tupath(t
skipUnlessi(tCitytCountytZipcodesGeos and postgis are required.t
GeographyTestcB@sMeZd�Zd�Zd�Zd�Zeed�d��Zd�Z	RS(cC@s|jdtjj��dS(s*Ensure geography features loaded properly.iN(tassertEqualRtobjectstcount(tself((sH/tmp/pip-install-XxeQeY/django/django/contrib/gis/tests/geogapp/tests.pyttest01_fixture_loadscC@s�tjjdd�}ttjjd|jtdd�f�jd�j	ddt
��}ttjjd|jtdd�f�jd�j	ddt
��}x-||gD]}|jd	d
dg|�q�WdS(
sJTesting GeoQuerySet distance lookup support on non-point geography fields.tcodet77002tpoint__distance_ltetmii�tnametflattpoint__dwithintDallastHoustons
Oklahoma CityN(R
R
tgettlistRtfiltertpolyRtorder_bytvalues_listtTrueR(Rtztcities1tcities2tcities((sH/tmp/pip-install-XxeQeY/django/django/contrib/gis/tests/geogapp/tests.pyttest02_distance_lookups		cC@s.tjjdd�}tjj|j�}dS(sETesting GeoQuerySet.distance() support on non-point geography fields.RRN(RR
RR
tdistancetpoint(Rthtowntqs((sH/tmp/pip-install-XxeQeY/django/django/contrib/gis/tests/geogapp/tests.pyttest03_distance_method)scC@s�tjjdd�}|jttjjd|j�j�|jttjjd|j�j�tjjdd�}|jttjjd|j	�dS(	sUEnsuring exceptions are raised for operators & functions invalid on geography fields.RRt
point__withintpoint__containedRRtpoint__exactN(
R
R
RtassertRaisest
ValueErrorRRRRR'(RR!R(((sH/tmp/pip-install-XxeQeY/django/django/contrib/gis/tests/geogapp/tests.pyt"test04_invalid_operators_functions/s
%%sGDAL is required.c
C@s}ddlm}tjjtjjtjjtt��dd��}tjj|dd�}idd6d	d
6dd6}d
ddddg}dddddg}dddddg}|t	||dddd�}|j
dtdt�x�tt	j
jd�|||�D]g\}	}
}}|jd|	jj�|j|t|	j��|j|
|	j�|j||	j�qWdS(s=Testing LayerMapping support on models with geography fields.i(tLayerMappings..tdatatcountiesscounties.shptNameRtStatetstatetMULTIPOLYGONtmpolytBexart	GalvestontHarristHonolulutPuebloiiitTexastHawaiitColoradot
source_srsi�tuniquetsilenttstricti�N(tdjango.contrib.gis.utilsR1tostpathtrealpathtjointdirnameRt__file__R	tsaveR tzipR
RRR8tsridtlenRR6(
RR1tshp_pathtco_shpt
co_mappingtnamest	num_polystst_namestlmtcRtnum_polyR6((sH/tmp/pip-install-XxeQeY/django/django/contrib/gis/tests/geogapp/tests.pyttest05_geography_layermapping>s 6

4cC@sDd}d}tjj�jdd�}|j|jj||�dS(s9Testing that Area calculations work on geography columns.g�B5-��TAiRRN(R
R
tareaRtassertAlmostEqualtsq_m(Rtref_areattolR!((sH/tmp/pip-install-XxeQeY/django/django/contrib/gis/tests/geogapp/tests.pyttest06_geography_area[s(
t__name__t
__module__RR%R*R0RRRYR_(((sH/tmp/pip-install-XxeQeY/django/django/contrib/gis/tests/geogapp/tests.pyRs				(t__doc__t
__future__RRFtdjango.contrib.gis.gdalRtdjango.contrib.gis.geosRtdjango.contrib.gis.measureRtdjango.contrib.gis.tests.utilsRtdjango.testRtdjango.utils._osRtdjango.utils.unittestRtmodelsRR	R
R(((sH/tmp/pip-install-XxeQeY/django/django/contrib/gis/tests/geogapp/tests.pyt<module>s

https://t.me/AnonymousX5 - 2025