Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 3.144.47.172
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_imageop.pyo
�
?��cc	@sdZddlmZmZmZmZedde�ZddlZddl	Z	ddl
Z
dZddddddd d"fZe
d
�ee�D��d#eZddZd$Zde
jfd��YZd�Zd�Zd�Zedkre�ndS(%s�Test script for the imageop module.  This has the side
   effect of partially testing the imgfile module as well.
   Roger E. Masse
i����(tverbosetunlinkt
import_moduletrun_unittesttimageopt
deprecatedNiiiii
iiccs|]}|VqdS(N((t.0tx((s8/usr/local/python-2.7/lib/python2.7/test/test_imageop.pys	<genexpr>sitAiitInputValidationTestscBs/eZdd�Zd�Zd�Zd�ZRS(c
Gs�tt|�}x�tD]�}x�tD]�}t||�}|rL||9}n|tkred|}nt}|r�||||f|}	n|||f|}	y||	�Wq#ttjfk
r�q#Xq#WqWdS(NR(tgetattrRtVALUEStabstMAX_LENtAAAAAt
ValueErrorterror(
tselftnametsizetextratfunctheighttwidthtstrlentdatat	arguments((s8/usr/local/python-2.7/lib/python2.7/test/test_imageop.pyt_checks 



cGs(x!tD]}|j|||�qWdS(N(tSIZESR(RRRR((s8/usr/local/python-2.7/lib/python2.7/test/test_imageop.pyt
check_size)s
cGs|j|d|�dS(N(RtNone(RRR((s8/usr/local/python-2.7/lib/python2.7/test/test_imageop.pytcheck-scCs|jddddd�|jddd�|jddd�|jd�|jdd�|jd	�|jd
�|jd�|jd�|jd
dd�|jd�|jd�|jd�|jd�|jd�|jtj��tjdddd�WdQXdS(Ntcropitscaleii����ttovideot	grey2monoi�t
grey2grey4t
grey2grey2tdither2monotdither2grey2t	mono2greyt
grey22greytrgb2rgb8trgb82rgbtrgb2greytgrey2rgbRii�(RRtassertRaisesRRR-(R((s8/usr/local/python-2.7/lib/python2.7/test/test_imageop.pyttest_input_validation0s"









N(t__name__t
__module__RRRRR/(((s8/usr/local/python-2.7/lib/python2.7/test/test_imageop.pyR	s		c	Cs�tt�yddl}Wntk
r.dSXtjtdtjd�dtjd�t	dtjd�\}}}t
r�dGHntj|d||ddd	d	�}t
r�d
GHntj
|d||d	d	�}t
r�dGHntj|d||�}t
r
dGHntj|||�}t
r0d
GHntj|||�}t
rSdGHntj|||�}t
rvdGHntj|||�}t
r�dGHntj|||d�}t
r�dGHntj|||dd�}t
r�dGHntj|||�}t
rdGHntj|||�}	t
r.dGHntj|||�}
t
rQdGHntj|||�}
t
rtdGHntj|	||�}t
r�dGHntj|
||�}tdtjd�dS(Ni����ttestrgbtuuettesttrgbR iiiR!R"R*R+R,R-R#R(i�R&R$R%R't
grey42greyR)(RR	timgfiletImportErrortuutdecodetget_qualified_pathtostextseptgetimageRRR R!R"R*R+R,R-R#R(R&R$R%R'R6R)R(R7timageRRtnewimaget
scaleimaget
videoimaget	greyimaget	monoimaget
grey4imaget
grey2image((s8/usr/local/python-2.7/lib/python2.7/test/test_imageop.pyt	test_mainDsj

, $cCs�ddl}y|j|�}Wn/|jk
rPt|�}|j|�}nXtrod|t|�fGHn|j|�}||d|dfS(sUreturn a tuple consisting of
       image (in 'imgfile' format) width and height
    i����Ns)imgfile opening test image: %s, sizes: %sii(R7tgetsizesRR;Rtstrtread(RR7tsizesR?((s8/usr/local/python-2.7/lib/python2.7/test/test_imageop.pyR>�scCs�ddl}ddl}|j}y|jjt�g|}Wntk
rQnXx9|D]1}|jj||�}|jj|�rY|SqYW|S(s% return a more qualified path to namei����N(tsysR<tpathtdirnamet__file__t	NameErrortjointexists(RRLR<RMtdirtfullname((s8/usr/local/python-2.7/lib/python2.7/test/test_imageop.pyR;�s	

t__main__(iiiiii�i�i�i�i�I�i���I�i���(ii(t__doc__ttest.test_supportRRRRtTrueRR9R<tunittestRt_VALUESttupletreversedRRR
tTestCaseR	RGR>R;R0(((s8/usr/local/python-2.7/lib/python2.7/test/test_imageop.pyt<module>s"$$
1	o		
© 2025 GrazzMean