%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/
Upload File :
Create Path :
Current File : //opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyo

�
�9Zc@`s=ddlmZmZmZddlZddlZddlmZddlZ	ddl
mZmZddl
mZmZmZmZmZmZddlmZmZmZmZmZmZdefd��YZd	efd
��YZd�Zdefd
��YZdefd��YZe dkr9e�ndS(i(tdivisiontabsolute_importtprint_functionN(tdate(tasbytestasbytes_nested(trun_module_suitetTestCasetassert_tassert_equaltassert_allcloset
assert_raises(tLineSplittert
NameValidatortStringConverterthas_nested_fieldst
easy_dtypet
flatten_dtypetTestLineSplittercB`sDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(sTests the LineSplitter class.cC`sutd�}t�|�}t|tdddddg��td�|�}t|tdddddg��dS(	sTest LineSplitter w/o delimiters 1 2 3 4  5 # testt1t2t3t4t5tN(RRR	R(tselftstrgttest((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyttest_no_delimiters
"c	C`s~td�}ttd��|�}t|tddddddg��ttd	��|�}t|td
dg��dS(sTest space delimiters 1 2 3 4  5 # testt RRRRRRs  s1 2 3 4N(RRR	R(RRR((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyttest_space_delimiters
%cC`s�td�}ttd��|�}t|tdddddg��td�}ttd��|�}t|td	d
dg��dS(sTest tab delimiters 1	 2	 3	 4	 5  6s	RRRRs5  6s 1  2	 3  4	 5  6s1  2s3  4N(RRR	R(RRR((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyttest_tab_delimiter&s"c	C`s�td�}ttd��|�}t|tddddddg��td	�}ttd��|�}t|tddddddg��d
S(sTest LineSplitter on delimiters
1,2,3,4,,5t,RRRRRRs 1,2,3,4,,5 # testN(RRR	R(RRR((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyttest_other_delimiter/s%c
C`s�td�}td�|�}t|tdddddddg��td	�}td
�|�}t|tdg��td	�}td�|�}t|tdg��d
S(s'Test LineSplitter w/ fixed-width fieldss  1  2  3  4     5   # testiRRRRRRs  1     3  4  5  6# testis1     3  4  5  6iN(RRR	R(RRR((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyttest_constant_fixed_width9s(cC`s{td�}td�|�}t|tddddg��td�}td�|�}t|tdd	d
g��dS(
Ns  1     3  4  5  6# testiiRRs4  5t6i	s3  4s5  6(iiii(iii	(RRR	R(RRR((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyttest_variable_fixed_widthGs(	t__name__t
__module__t__doc__RRRR!R"R$(((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyRs					
	tTestNameValidatorcB`s5eZd�Zd�Zd�Zd�Zd�ZRS(cC`s�ddddg}t�j|�}t|ddddg�tdt�j|�}t|ddddg�tdd	�j|�}t|ddddg�tdd
�j|�}t|ddddg�tttdd�d
S(sTest case sensitivitytAtatbtctcase_sensitivetA_1tBtCtuppertlowerta_1tfoobarN(R
tvalidateR	tFalseRt
ValueError(RtnamesR((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyttest_case_sensitivityUscC`sVddddg}tddddg�}|j|�}t|dddd	g�d
S(sTest excludelisttdatestdatas
Other Datatmasktexcludelisttdates_tdata_t
Other_Datatmask_N(R
R5R	(RR8t	validatorR((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyttest_excludelistdscC`s�d	}t�}t||�dddg�d
}t||�dddg�d}t||�dddg�d}t||�dddg�dS(
sTest validate missing namesR*R+R,Rtf0tf1tf2N(R*R+R,(RR+R,(R*R+R(RRDR(R
R	(RtnamelistRB((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyttest_missing_namesks	cC`sZd}t�}t||dd�d
�t||dddd�dddd	d
g�dS(sTest validate nb namesR*R+R,tnbfieldsiit
defaultfmtsg%itg0tg1N(R*R+R,(R*(R
R	(RRGRB((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyttest_validate_nb_namesws
	cC`sKd}t�}t||�dk�t||dd�dddg�dS(sTest validate no namesRIiRDRERFN(tNoneR
RR	(RRGRB((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyttest_validate_wo_namess	(R%R&R9RCRHRMRO(((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyR(Ss
				cC`sTtjddkr6ttj|jd�d�d �Sttj|d�d �SdS(Niitlatin1s%Y-%m-%d(tsystversion_infoRttimetstrptimetdecode(ts((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyt_bytes_to_date�s#tTestStringConvertercB`sheZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�ZRS(sTest StringConvertercC`s3ttd�}t|jd�t|jd�dS(s"Test creation of a StringConverteriay��iN(RtintR	t_statustdefault(Rt	converter((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyt
test_creation�scC`s`t�}t|jd�t|jtd��d�t|jd�ddljj}t|j	|j
�j|j	|j�jk�}t|jtd��d�t|jd|�t
|jtd��d�t|jd	|�t|jtd
��td
��t|jd|�t|jtd��td��t|jt|j�d�dS(
sTests the upgrade method.it0iNt17179869184Is0.git0jiR*(RR	RZtupgradeRtnumpy.core.numerictcoretnumericRYtdtypetintegertitemsizetint64R
tcomplextlent_mapper(RR\tnxt
status_offset((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyttest_upgrade�s	0""cC`s�tdtd�td�f�}|jtd��t|td��d�t|td��|j�t|td��|j�t|td��|j�y|d�Wntk
r�nXdS(	s Tests the use of missing values.tmissing_valuestmissingtmissedR^iRtmissN(RRRaR	R[R7(RR\((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyttest_missing�s
cC`s�t}tj|tddd��t|tddd��}|td��}t|tddd��|td��}t|tddd��|td��}t|tddd��dS(	sTests updatemapperi�is
2001-01-01i�s
2009-01-01i�RN(RWRtupgrade_mapperRRR	(Rt
dateparsertconvertR((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyttest_upgrademapper�scC`sAtt�}t|jddd�d�tt|d��dS(sAMake sure that string-to-object functions are properly recognizedi����iyR[N(RRWR	RkRthasattr(Rtconv((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyttest_string_to_object�scC`s�tddtd�dd�}|jtd��t|jd�t|jtjt	��tddtd�dd�}|jtd��t|jd�t|jtjt	��dS(s+Make sure we don't lose an explicit defaultRoRR[i���s
3.14159265iN(
RRNRRaR	R[ttypetnpRetfloat(RR\((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyttest_keep_default�s	cC`s2ttdddtd��}t|jd�dS(s'Check that we don't lose a default of 0R[iRosN/AN(RRYRR	R[(RR\((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyttest_keep_default_zero�scC`sDttdddtd��}t|jttddg���dS(s*Check that we're not losing missing valuesR[iRosN/ARN(RRYRR	RotsetR(RR\((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyttest_keep_missing_values�scC`s]ttjdd�}td�}t||�dk�td�}t||�dk�dS(s/Check that int64 integer types can be specifiedR[is-9223372036854775807I�t9223372036854775807I�������N(RR|RhRR(RR\tval((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyttest_int64_dtype�s
cC`s;ttjdd�}td�}t||�dk�dS(s0Check that uint64 integer types can be specifiedR[it9223372043271415339l+&�|N(RR|tuint64RR(RR\R�((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyttest_uint64_dtype�s(
R%R&R'R]RnRsRwRzR~RR�R�R�(((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyRX�s									tTestMiscFunctionscB`s#eZd�Zd�Zd�ZRS(cC`s�tjtj�}tt|�t�tjddtfg�}tt|�t�tjdtfddtfd	gfg�}tt|�t�dS(
sTest has_nested_dtypeR)s|S3R/tBAtBBs|S1N(R)s|S3(R�s|S1(R|ReR}R	RR6RYtTrue(Rtndtype((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyttest_has_nested_dtypes-cC`sEt}tt|�tjt��d}tt|�tjddg��tt|dd�tjddg��d}tt|d
d�tjd d!g��d}tt|d
d�tjd"d#g��d}tt|d
d�tjd$d%g��tt|d
ddd�tjd&d'g��dtfdtfg}tt|�tjdtfdtfg��tt|d
d�tjdtfd
tfg��tt|d
d�tjdtfdtfg��tt|d
d�tjdtfd
tfg��tttf}tt|�tjdtfdtfdtfg��tttf}tt|d
d�tjdtfd
tfdtfg��tjt�}tt|d
d�tjgd(D]}|tf^q���tjt�}tt|d
dddgdd�tjgd)D]}|tf^q%��dS(*sTest ndtype on dtypessi4, f8RDti4REtf8RJs
field_%03it	field_000t	field_001R8sa, bR*R+sa, b, cs, bsf%02itf00R)R/sa,bsa,b,cRFR,Rtf01tf02N(RDR�(RER�(R�R�(R�R�(R*R�(R+R�(R*R�(R+R�(RDR�(R+R�(R*R�(R�R�(R*R+R,(R�R�R�(R}R	RR|ReRY(RR�t_((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyttest_easy_dtype
sN."""++)cC`sAtjd
dg�}t|�}t|ttg�tjdddgfdtfg�}t|�}t|tjd�tjd�tg�tjdtdffdtd	ffg�}t|�}t|ttg�t|t�}t|tgdtgd	�tjddg�}t|�}t|ttg�dS(sTesting flatten_dtypeR*R�R+taas|S1tabs|S2iiR)R/N(R*R�(R+R�(R�s|S1(R�s|S2(R*R)((R*R)R�(R+R/((R+R/R�(R|ReRR	R}RYR�(Rtdttdt_flat((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyttest_flatten_dtypeFs'(-(R%R&R�R�R�(((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyR�s			9t__main__(!t
__future__RRRRQRStdatetimeRtnumpyR|tnumpy.compatRRt
numpy.testingRRRR	R
Rtnumpy.lib._iotoolsRR
RRRRRR(RWRXR�R%(((sP/opt/alt/python27/lib64/python2.7/site-packages/numpy/lib/tests/test__iotools.pyt<module>s..@6	rY

Zerion Mini Shell 1.0