Your IP : 216.73.216.213


Current Path : /opt/alt/python34/lib64/python3.4/test/test_importlib/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib64/python3.4/test/test_importlib/__pycache__/test_spec.cpython-34.pyo

�
g f׏�@sddlmZejd�\ZZejZejZejd�\ZZ	ejd�\Z
ZddlZ
ddlmZddlZddlZddlZGdd	�d	�ZGd
d�de�ZGdd
�d
e�ZGdd�d�ZGdd�deej�ZGdd�deej�ZGdd�d�ZGdd�deej�ZGdd�deej�ZGdd�d�ZGdd�deej�ZGdd�deej�ZGd d!�d!�Z Gd"d#�d#e ej�Z!Gd$d%�d%e ej�Z"dS)&�)�util�	importlibzimportlib.machineryzimportlib.util�N)�CleanImportc@sReZdZdddd�Zdd�Zdd�Zdd	�Zd
d�ZdS)�
TestLoaderNcCs||_||_dS)N)�path�package)�selfr�
is_package�r�B/opt/alt/python34/lib64/python3.4/test/test_importlib/test_spec.py�__init__s	zTestLoader.__init__cCsdS)Nz<TestLoader object>r)r	rrr�__repr__szTestLoader.__repr__cCsE|dkr"|jdk	r"|jS|dkr5|jSt|��dS)N�get_filenamer
)r�
_get_filename�_is_package�AttributeError)r	�namerrr�__getattr__s
zTestLoader.__getattr__cCs|jS)N)r)r	rrrrr!szTestLoader._get_filenamecCs|jS)N)r)r	rrrrr$szTestLoader._is_package)�__name__�
__module__�__qualname__r
rrrrrrrrrs
rc@s"eZdZdZdd�ZdS)�	NewLoaderrcCs|j|_dS)N)�EGGS�eggs)r	�modulerrr�exec_module,szNewLoader.exec_moduleN)rrrrrrrrrr(src
@sNeZdZdZej��*ejde�ej	dd��Z
WdQXdS)�LegacyLoaderr�ignorecCs|j|_|S)N)�HAM�ham)r	rrrr�load_module7szLegacyLoader.load_moduleN���)rrrr�warnings�catch_warnings�simplefilter�DeprecationWarning�frozen_util�module_for_loaderr!rrrrr0s
rc@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'S)(�ModuleSpecTestscCs�d|_d|_|jj|j�|_t�|_|jj|j|j�|_	|jj|j|jd|j�|_
d|j
_dS)N�spamzspam.py�originT)rrr�cache_from_source�cachedr�loader�	machinery�
ModuleSpec�spec�loc_spec�
_set_fileattr)r	rrr�setUp?s		zModuleSpecTests.setUpcCs�|jj|j|j�}|j|j|j�|j|j|j�|j|jd�|j|jd�|j|jd�|j|j	d�|j
|j�dS)N)r/r0rr.�assertEqual�assertIsr+�loader_state�submodule_search_locationsr-�assertFalse�has_location)r	r1rrr�test_defaultIszModuleSpecTests.test_defaultcCs�|jj|jd�}|j|j|j�|j|jd�|j|jd�|j|jd�|j|jd�|j|j	d�|j
|j�dS)N)r/r0rr5r6r.r+r7r8r-r9r:)r	r1rrr�test_default_no_loaderTsz&ModuleSpecTests.test_default_no_loadercCs�|jj|j|jdd�}|j|j|j�|j|j|j�|j|jd�|j|jd�|j|jd�|j|j	d�|j
|j�dS)Nr
F)r/r0rr.r5r6r+r7r8r-r9r:)r	r1rrr�test_default_is_package_false_s	z-ModuleSpecTests.test_default_is_package_falsecCs�|jj|j|jdd�}|j|j|j�|j|j|j�|j|jd�|j|jd�|j|jg�|j|j	d�|j
|j�dS)Nr
T)r/r0rr.r5r6r+r7r8r-r9r:)r	r1rrr�test_default_is_package_trueks	z,ModuleSpecTests.test_default_is_package_truecCsN|jj|j|jdd�}|j|j�d|_|j|j�dS)Nr+Z	somewhereT)r/r0rr.r9r:�
assertTrue)r	r1rrr�test_has_location_setterws
		z(ModuleSpecTests.test_has_location_setterc
CsVttj�d|jd|jdddddddd�}|j|j|k�dS)Nrr.r+r8r:Fr-)�type�sys�implementationrr.r?r1)r	�otherrrr�
test_equality~s		zModuleSpecTests.test_equalityc
CsYttj�d|jd|jd|jddddd|j�}|j|j|�dS)Nrr.r+r8r:Tr-)	rArBrCrr.rr-r5r2)r	rDrrr�test_equality_location�s		z&ModuleSpecTests.test_equality_locationc
CsPttj�ddd|jdddddddd�}|j|j|�dS)	Nrr r.r+r8r:Fr-)rArBrCr.�assertNotEqualr1)r	rDrrr�test_inequality�s		zModuleSpecTests.test_inequalitycCs;ttj�d|jd|j�}|j|j|�dS)Nrr.)rArBrCrr.rGr1)r	rDrrr�test_inequality_incomplete�sz*ModuleSpecTests.test_inequality_incompletecCs/|jjd|j�}|j|jd�dS)Nz	spam.eggsr*)r/r0r.r5�parent)r	r1rrr�test_package�szModuleSpecTests.test_packagecCs5|jjd|jdd�}|j|jd�dS)Nz	spam.eggsr
T)r/r0r.r5rJ)r	r1rrr�test_package_is_package�s	z'ModuleSpecTests.test_package_is_packagecCsH|jj}d|j_|jj}|j|d�|j|d�dS)NZthere)r1r-r6r5)r	Zbefore�afterrrr�test_cached_set�s
zModuleSpecTests.test_cached_setcCs2|jj|j|j�}|j|jd�dS)N)r/r0rr.r6r-)r	r1rrr�test_cached_no_origin�sz%ModuleSpecTests.test_cached_no_origincCs;|jj|j|jd|j�}|j|jd�dS)Nr+)r/r0rr.rr6r-)r	r1rrr�$test_cached_with_origin_not_location�sz4ModuleSpecTests.test_cached_with_origin_not_locationcCs/|jj|j�}|j|jj|�dS)N)rr,rr5r2r-)r	Zexpectedrrr�test_cached_source�sz"ModuleSpecTests.test_cached_sourcecCs&d|j_|j|jjd�dS)Nzspam.spamspamspam)r2r+r6r-)r	rrr�!test_cached_source_unknown_suffix�sz1ModuleSpecTests.test_cached_source_unknown_suffixcCsLtjj}dtj_z|jj}Wd|tj_X|j|d�dS)N)rBrC�	cache_tagr2r-r6)r	�originalr-rrr�$test_cached_source_missing_cache_tag�s
z4ModuleSpecTests.test_cached_source_missing_cache_tagcCs&d|j_|j|jjd�dS)Nzspam.pyc)r2r+r5r-)r	rrr�test_cached_sourceless�sz&ModuleSpecTests.test_cached_sourcelessN)rrrr4r;r<r=r>r@rErFrHrIrKrLrNrOrPrQrRrUrVrrrrr)=s&

r)c@seZdZeZeZdS)�Frozen_ModuleSpecTestsN)rrrr'r�frozen_machineryr/rrrrrW�srWc@seZdZeZeZdS)�Source_ModuleSpecTestsN)rrr�source_utilr�source_machineryr/rrrrrY�srYc@s0eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1S)2�ModuleSpecMethodsTestscCs�d|_d|_|jj|j�|_t�|_|jj|j|j�|_	|jj|j|jd|j�|_
d|j
_dS)Nr*zspam.pyr+T)rrrr,r-rr.r/r0r1r2r3)r	rrrr4�s		zModuleSpecMethodsTests.setUpcCs�tt�|j�}|jj|j|j�}|jj|�j|�|j	|j
|j�|j|j|j�|j	|j
|j�|j|j|�|jt|d��|jt|d��|jt|d��dS)N�__path__�__file__�
__cached__)rArBrr/r0r.�	bootstrap�_SpecMethods�init_module_attrsr5rr6�
__loader__�__package__rJ�__spec__r9�hasattr)r	rr1rrr�test_init_module_attrs�sz-ModuleSpecMethodsTests.test_init_module_attrscCs�tt�|j�}|jj|j|j�}ddg|_|jj|�j	|�|j
|j|j�|j|j
|j�|j
|j|j�|j|j|�|j|j|j�|jt|d��|jt|d��dS)Nr*r r^r_)rArBrr/r0r.r8r`rarbr5rr6rcrdrJrer]r9rf)r	rr1rrr�test_init_module_attrs_packagesz5ModuleSpecMethodsTests.test_init_module_attrs_packagecCs�tt�|j�}|j}|jj|�j|�|j|j|j�|j	|j
|j�|j|j|j
�|j	|j|�|jt|d��|j|j|j�|j|j|jj|j��dS)Nr])rArBrr2r`rarbr5rr6rcr.rdrJrer9rfr^r+r_rr,)r	rr1rrr�test_init_module_attrs_locations	z6ModuleSpecMethodsTests.test_init_module_attrs_locationcCs`tt�d�}|jj|j|j�}|jj|�j|�|j	|j
|j�dS)Nr)rArBr/r0rr.r`rarbr5r)r	rr1rrr�%test_init_module_attrs_different_name!sz<ModuleSpecMethodsTests.test_init_module_attrs_different_namecCs�tt�|j�}|jjdt��|_|jj|j|j�}|jj	|�j
|�|j|j|j�|j
|j|j�|j|j|j�|j
|j|�dS)Nr)rArBrr/r0�objectrer.r`rarbr5rr6rcrdrJ)r	rr1rrr�%test_init_module_attrs_different_spec(sz<ModuleSpecMethodsTests.test_init_module_attrs_different_speccCstt�d�}t�|_d|_dg|_d|_|jj|j�|_	t
|�j�}|j}dg|_
|jj|�j|�|j|j|d�|j|j|d�|j|j|d�|j|j|d	�|j|j	|d
�dS)Nzham.eggsr rzham/eggs/__init__.py�rcrdr]r^r_)rArBrkrcrdr]r^rr,r_�vars�copyr2r8r`rarbr6r5)r	rrTr1rrr�"test_init_module_attrs_already_set3s			z9ModuleSpecMethodsTests.test_init_module_attrs_already_setcCs�t�}|j}dg|_|jj|�j|�|jt|d��|jt|d��|jt|d��|jt|d��|jt|d��|jt|d��|jt|d��dS)	Nrmrrcrdrer]r^r_)rkr2r8r`rarbr9rf)r	rr1rrr� test_init_module_attrs_immutableEs		z7ModuleSpecMethodsTests.test_init_module_attrs_immutablecCs�|jj|j�j�}|j|j|jj�|j|j|jj	�|j|j
|jj�|j|j|j�|j
t|d��|j
t|d��|j
t|d��dS)Nr]r^r_)r`rar1�creater5rrr6rcr.rdrJrer9rf)r	�createdrrr�test_createUsz"ModuleSpecMethodsTests.test_createcsttj���G�fdd�dt�}|�|j_|jj|j�j�}|j	|��|j
|j|jj�|j	|j
|jj�|j
|j|jj�|j	|j|j�|jt|d��|jt|d��|jt|d��dS)Ncs"eZdZ�fdd�ZdS)zFModuleSpecMethodsTests.test_create_from_loader.<locals>.CreatingLoadercs�S)Nr)r	r1)rrr�
create_modulecszTModuleSpecMethodsTests.test_create_from_loader.<locals>.CreatingLoader.create_moduleN)rrrrur)rrr�CreatingLoaderbsrvr]r^r_)rArBrCrr1r.r`rarrr6r5rrrcrdrJrer9rf)r	rvrsr)rr�test_create_from_loader`sz.ModuleSpecMethodsTests.test_create_from_loadercCs�Gdd�dt�}|�|j_|jj|j�j�}|j|j|jj�|j	|j
|jj�|j|j|jj�|j	|j
|j�|jt|d��|jt|d��|jt|d��dS)Nc@seZdZdd�ZdS)zRModuleSpecMethodsTests.test_create_from_loader_not_handled.<locals>.CreatingLoadercSsdS)Nr)r	r1rrrrussz`ModuleSpecMethodsTests.test_create_from_loader_not_handled.<locals>.CreatingLoader.create_moduleN)rrrrurrrrrvrsrvr]r^r_)rr1r.r`rarrr5rrr6rcrdrJrer9rf)r	rvrsrrr�#test_create_from_loader_not_handledqsz:ModuleSpecMethodsTests.test_create_from_loader_not_handledcCs�t�|j_|jj|j�j�}|tj|j<|j	t
|d��|jj|j�j|�|j|j
d�dS)Nrr)rr1r.r`rarrrB�modulesrr9rf�execr5r)r	rrrr�	test_exec�sz ModuleSpecMethodsTests.test_execc	Cs}t�|j_t|jj��3|jj|j�j�}tj	|jj}WdQX|j
|jd�|j||�dS)Nr)
rr1r.rrr`ra�loadrBryr5rr6)r	�loaded�	installedrrr�	test_load�sz ModuleSpecMethodsTests.test_loadc	s�t��G�fdd�dt�}|�|j_t|jj��3|jj|j�j�}t	j
|jj}WdQX|j|��|j|��dS)Ncs"eZdZ�fdd�ZdS)zBModuleSpecMethodsTests.test_load_replaced.<locals>.ReplacingLoadercs�tj|j<dS)N)rBryr)r	r)�replacementrrr�szNModuleSpecMethodsTests.test_load_replaced.<locals>.ReplacingLoader.exec_moduleN)rrrrr)r�rr�ReplacingLoader�sr�)rkrr1r.rrr`rar|rBryr6)r	r�r}r~r)r�r�test_load_replaced�s	z)ModuleSpecMethodsTests.test_load_replacedcCs�Gdd�dt�}|�|j_t|jj��O|jt�� |jj|j�j	�}WdQX|j
|jjtj�WdQXdS)Nc@seZdZdd�ZdS)z=ModuleSpecMethodsTests.test_load_failed.<locals>.FailedLoadercSs
t�dS)N)�RuntimeError)r	rrrrr�szIModuleSpecMethodsTests.test_load_failed.<locals>.FailedLoader.exec_moduleN)rrrrrrrr�FailedLoader�sr�)
rr1r.rr�assertRaisesr�r`rar|�assertNotInrBry)r	r�r}rrr�test_load_failed�s!z'ModuleSpecMethodsTests.test_load_failedcCs�Gdd�dt�}|�|j_t|jj��O|jt�� |jj|j�j	�}WdQX|j
|jjtj�WdQXdS)Nc@seZdZdd�ZdS)zEModuleSpecMethodsTests.test_load_failed_removed.<locals>.FailedLoadercSstj|j=t�dS)N)rBryrr�)r	rrrrr�s
zQModuleSpecMethodsTests.test_load_failed_removed.<locals>.FailedLoader.exec_moduleN)rrrrrrrrr��sr�)
rr1r.rrr�r�r`rar|r�rBry)r	r�r}rrr�test_load_failed_removed�s!z/ModuleSpecMethodsTests.test_load_failed_removedc	CsZt�|j_t|jj�� |jj|j�j�}WdQX|j|j	d�dS)Nrr")
rr1r.rrr`rar|r5r )r	r}rrr�test_load_legacy�s!z'ModuleSpecMethodsTests.test_load_legacyc	Cs�t�|j_t|jj�� |jj|j�j�}WdQX|j|j	|jj�|j
|j|jj�|j|j
|j�dS)N)rr1r.rrr`rar|r6rcr5rdrJre)r	r}rrr�test_load_legacy_attributes�s!z2ModuleSpecMethodsTests.test_load_legacy_attributesc
s�t��G�fdd�dt�}|�|j_t|jj��=|jj|j�j�}|j	t
j|jj��WdQXdS)Ncs"eZdZ�fdd�ZdS)zUModuleSpecMethodsTests.test_load_legacy_attributes_immutable.<locals>.ImmutableLoadercs�tj|<�S)N)rBry)r	r)rrrr!�s
zaModuleSpecMethodsTests.test_load_legacy_attributes_immutable.<locals>.ImmutableLoader.load_moduleN)rrrr!r)rrr�ImmutableLoader�sr�)rkrr1r.rrr`rar|r6rBry)r	r�r}r)rr�%test_load_legacy_attributes_immutable�s	z<ModuleSpecMethodsTests.test_load_legacy_attributes_immutablec	Cs�t�|j_t|jj��Q|jj|j�j�}|jj|j�j|�}t	j
|jj}WdQX|j|jd�|j
||�|j
||�dS)Nr)rr1r.rrr`rar|rzrBryr5rr6)r	r}�reloadedr~rrr�test_reload�sz"ModuleSpecMethodsTests.test_reloadc	Cs�t�|j_t|jj��G|jj|j�j�}d|_|jj|j�j	|�}WdQX|j
|jd�|j||�dS)N�r)rr1r.rrr`rar|rrzr5r6)r	r}r�rrr�test_reload_modified�s	$z+ModuleSpecMethodsTests.test_reload_modifiedc	Cs�t�|j_t|jj��G|jj|j�j�}d|_|jj|j�j	|�}WdQX|j
|j�|j||�dS)NF)rr1r.rrr`rar|Z	availablerzr9r6)r	r}r�rrr�test_reload_extra_attributes�s	$z3ModuleSpecMethodsTests.test_reload_extra_attributesc
Cs!t�|j_t|jj��W|jj|j�j�}d|_|`	|`
|`|jj|j�j|�WdQX|j
|j|jj�|j|j	|jj�|j
|j
|jj�|j|j|j�|jt|d��|jt|d��|jt|d��dS)Nr r]r^r_)rr1r.rrr`rar|rrcrdrerzr5r6rJr9rf)r	r}rrr�test_reload_init_module_attrs�s	"z4ModuleSpecMethodsTests.test_reload_init_module_attrsc	Cs�t�|j_t|jj��Q|jj|j�j�}|jj|j�j|�}t	j
|jj}WdQX|j|jd�|j
||�|j
||�dS)Nrr")rr1r.rrr`rar|rzrBryr5r r6)r	r}r�r~rrr�test_reload_legacysz)ModuleSpecMethodsTests.test_reload_legacyN)rrrr4rgrhrirjrlrprqrtrwrxr{rr�r�r�r�r�r�r�r�r�r�r�rrrrr\�s0
	

	

r\c@s"eZdZeZeZeZdS)�Frozen_ModuleSpecMethodsTestsN)	rrr�frozen_bootstrapr`rXr/r'rrrrrr�sr�c@s"eZdZeZeZeZdS)�Source_ModuleSpecMethodsTestsN)	rrr�source_bootstrapr`r[r/rZrrrrrr�sr�c@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�ModuleReprTestscCs4tt�d�|_|jjdt��|_dS)Nr*)rA�osrr/r0rr1)r	rrrr4!szModuleReprTests.setUpcCsKGdd�d�}|�|j_|jj|j�}|j|d�dS)Nc@seZdZdd�ZdS)zBModuleReprTests.test_module___loader___module_repr.<locals>.LoadercSsdj|j�S)Nz<delicious {}>)�formatr)r	rrrr�module_repr'szNModuleReprTests.test_module___loader___module_repr.<locals>.Loader.module_reprN)rrrr�rrrr�Loader&sr�z<delicious spam>)rrcr`�_module_reprr5)r	r��modreprrrr�"test_module___loader___module_repr%sz2ModuleReprTests.test_module___loader___module_reprcCsWGdd�dt�}|�|j_|jj|j�}|j|djd��dS)Nc@seZdZdd�ZdS)zFModuleReprTests.test_module___loader___module_repr_bad.<locals>.LoadercSs
t�dS)N)�	Exception)r	rrrrr�0szRModuleReprTests.test_module___loader___module_repr_bad.<locals>.Loader.module_reprN)rrrr�rrrrr�/sr�z#<module {!r} (<TestLoader object>)>r*)rrrcr`r�r5r�)r	r�r�rrr�&test_module___loader___module_repr_bad.s
	z6ModuleReprTests.test_module___loader___module_repr_badcCsVd}||j_|j|j_|jj|j�}|j|djd|��dS)Nzin a hole, in the groundz<module {!r} ({})>r*)r1r+rrer`r�r5r�)r	r+r�rrr�test_module___spec__8s
z$ModuleReprTests.test_module___spec__cCsbd}||j_d|j_|j|j_|jj|j�}|j|djd|��dS)Nzin_a_galaxy_far_far_away.pyTz<module {!r} from {!r}>r*)	r1r+r3rrer`r�r5r�)r	�locationr�rrr�test_module___spec___location@s	z-ModuleReprTests.test_module___spec___locationcCsPt�|j_|j|j_|jj|j�}|j|djd��dS)Nz#<module {!r} (<TestLoader object>)>r*)	rr1r.rrer`r�r5r�)r	r�rrr�test_module___spec___no_originJs
	z.ModuleReprTests.test_module___spec___no_origincCsMd|j_|j|j_|jj|j�}|j|djd��dS)Nz
<module {!r}>r*)r1r.rrer`r�r5r�)r	r�rrr�(test_module___spec___no_origin_no_loaderRsz8ModuleReprTests.test_module___spec___no_origin_no_loadercCs;|j`|jj|j�}|j|djd��dS)Nz
<module {!r}>�?)rrr`r�r5r�)r	r�rrr�test_module_no_nameYs	z#ModuleReprTests.test_module_no_namecCsGd}||j_|jj|j�}|j|djd|��dS)Nze/i/e/i/o/spam.pyz<module {!r} from {!r}>r*)rr^r`r�r5r�)r	�filenamer�rrr�test_module_with_file_s
	z%ModuleReprTests.test_module_with_filecCsAt�|j_|jj|j�}|j|djd��dS)Nz#<module {!r} (<TestLoader object>)>r*)rrrcr`r�r5r�)r	r�rrr�test_module_no_filegs	z#ModuleReprTests.test_module_no_filecCs2|jj|j�}|j|djd��dS)Nz
<module {!r}>r*)r`r�rr5r�)r	r�rrr�test_module_no_file_no_loadernsz-ModuleReprTests.test_module_no_file_no_loaderN)rrrr4r�r�r�r�r�r�r�r�r�r�rrrrr�s	

r�c@s"eZdZeZeZeZdS)�Frozen_ModuleReprTestsN)	rrrr�r`rXr/r'rrrrrr�tsr�c@s"eZdZeZeZeZdS)�Source_ModuleReprTestsN)	rrrr�r`r[r/rZrrrrrr�zsr�c@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3S)4�FactoryTestscCsad|_d|_|jj|j�|_t�|_t|j�|_t|jd�|_dS)Nr*zspam.pyT)	rrrr,r-rr.�
fileloader�	pkgloader)r	rrrr4�s		zFactoryTests.setUpcCs�|jj|j|j�}|j|j|j�|j|j|j�|j|jd�|j|jd�|j|jd�|j|j	d�|j
|j�dS)N)r�spec_from_loaderrr.r5r6r+r7r8r-r9r:)r	r1rrr�test_spec_from_loader_default�sz*FactoryTests.test_spec_from_loader_defaultcCs�Gdd�d�}|�}|jj|j|�}|j|j|j�|j|j|�|j|jd�|j|jd�|j|jd�|j|j	d�|j
|j�dS)Nc@seZdZdd�ZdS)zNFactoryTests.test_spec_from_loader_default_with_bad_is_package.<locals>.LoadercSs
t�dS)N)�ImportError)r	rrrrr
�szYFactoryTests.test_spec_from_loader_default_with_bad_is_package.<locals>.Loader.is_packageN)rrrr
rrrrr��sr�)rr�rr5r.r6r+r7r8r-r9r:)r	r�r.r1rrr�1test_spec_from_loader_default_with_bad_is_package�s	z>FactoryTests.test_spec_from_loader_default_with_bad_is_packagecCs�d}|jj|j|jd|�}|j|j|j�|j|j|j�|j|j|�|j|jd�|j|jd�|j|j	d�|j
|j�dS)Nzsomewhere over the rainbowr+)rr�rr.r5r6r+r7r8r-r9r:)r	r+r1rrr�test_spec_from_loader_origin�s	z)FactoryTests.test_spec_from_loader_origincCs�|jj|j|jdd�}|j|j|j�|j|j|j�|j|jd�|j|jd�|j|jd�|j|j	d�|j
|j�dS)Nr
F)rr�rr.r5r6r+r7r8r-r9r:)r	r1rrr�&test_spec_from_loader_is_package_false�s	z3FactoryTests.test_spec_from_loader_is_package_falsecCs�|jj|j|jdd�}|j|j|j�|j|j|j�|j|jd�|j|jd�|j|jg�|j|j	d�|j
|j�dS)Nr
T)rr�rr.r5r6r+r7r8r-r9r:)r	r1rrr�%test_spec_from_loader_is_package_true�s	z2FactoryTests.test_spec_from_loader_is_package_truecCs�d}|jj|j|jd|dd�}|j|j|j�|j|j|j�|j|j|�|j|jd�|j|jg�|j|j	d�|j
|j�dS)Nzwhere the streets have no namer+r
T)rr�rr.r5r6r+r7r8r-r9r:)r	r+r1rrr�+test_spec_from_loader_origin_and_is_package�sz8FactoryTests.test_spec_from_loader_origin_and_is_packagecCs�tdd�}|jj|j|�}|j|j|j�|j|j|�|j|jd�|j|jd�|j|j	d�|j|j
d�|j|j�dS)Nr
F)
rrr�rr5r.r6r+r7r8r-r9r:)r	r.r1rrr�2test_spec_from_loader_is_package_with_loader_false�sz?FactoryTests.test_spec_from_loader_is_package_with_loader_falsecCs�tdd�}|jj|j|�}|j|j|j�|j|j|�|j|jd�|j|jd�|j|j	g�|j|j
d�|j|j�dS)Nr
T)
rrr�rr5r.r6r+r7r8r-r9r:)r	r.r1rrr�1test_spec_from_loader_is_package_with_loader_true�sz>FactoryTests.test_spec_from_loader_is_package_with_loader_truecCs�|jj|j|j�}|j|j|j�|j|j|j�|j|j|j�|j|j	d�|j|j
d�|j|j|j�|j|j
�dS)N)rr�rr�r5r.r+rr6r7r8r-r?r:)r	r1rrr�.test_spec_from_loader_default_with_file_loader�sz;FactoryTests.test_spec_from_loader_default_with_file_loadercCs�|jj|j|jdd�}|j|j|j�|j|j|j�|j|j|j�|j|j	d�|j|j
d�|j|j|j�|j|j
�dS)Nr
F)rr�rr�r5r.r+rr6r7r8r-r?r:)r	r1rrr�6test_spec_from_loader_is_package_false_with_fileloader�s	zCFactoryTests.test_spec_from_loader_is_package_false_with_fileloadercCs�|jj|j|jdd�}|j|j|j�|j|j|j�|j|j|j�|j|j	d�|j|j
dg�|j|j|j�|j|j
�dS)Nr
Trm)rr�rr�r5r.r+rr6r7r8r-r?r:)r	r1rrr�5test_spec_from_loader_is_package_true_with_fileloaders	zBFactoryTests.test_spec_from_loader_is_package_true_with_fileloadercCs|jtkr!tjd��n|jj|j|j�}|j|j|j�|j	|j
|jj�|j|j
j|j�|j|j
j|j�|j|j|j�|j
|jd�|j
|jd�|j|j|j�|j|j�dS)Nz not sure why this is breaking...)r/r[�unittestZSkipTestr�spec_from_file_locationrrr5ZassertIsInstancer.�SourceFileLoaderr+r6r7r8r-r?r:)r	r1rrr�$test_spec_from_file_location_defaults
z1FactoryTests.test_spec_from_file_location_defaultcCs)|jj|j�}|j|d�dS)N)rr�rr6)r	r1rrr�5test_spec_from_file_location_default_without_location%szBFactoryTests.test_spec_from_file_location_default_without_locationcCs,|jj|jd�}|j|d�dS)Nz	spam.eggs)rr�rr6)r	r1rrr�/test_spec_from_file_location_default_bad_suffix*sz<FactoryTests.test_spec_from_file_location_default_bad_suffixcCs�|jj|jd|j�}|j|j|j�|j|j|j�|j|j|j�|j|j	d�|j|j
d�|j|j|j�|j|j
�dS)Nr.)rr�rr�r5r.r+rr6r7r8r-r?r:)r	r1rrr�/test_spec_from_file_location_loader_no_location/sz<FactoryTests.test_spec_from_file_location_loader_no_locationcCs�|jj|jd|j�}|j|j|j�|j|j|j�|j|jd�|j|jd�|j|jd�|j|j	d�|j
|j�dS)Nr.z	<unknown>)rr�rr.r5r+r6r7r8r-r?r:)r	r1rrr�?test_spec_from_file_location_loader_no_location_no_get_filename;szLFactoryTests.test_spec_from_file_location_loader_no_location_no_get_filenamecCs�Gdd�d�}|�}|jj|jd|�}|j|j|j�|j|j|�|j|jd�|j|jd�|j|jd�|j|j	d�|j
|j�dS)Nc@seZdZdd�ZdS)z]FactoryTests.test_spec_from_file_location_loader_no_location_bad_get_filename.<locals>.LoadercSs
t�dS)N)r�)r	rrrrrIszjFactoryTests.test_spec_from_file_location_loader_no_location_bad_get_filename.<locals>.Loader.get_filenameN)rrrrrrrrr�Hsr�r.z	<unknown>)rr�rr5r.r+r6r7r8r-r?r:)r	r�r.r1rrr�@test_spec_from_file_location_loader_no_location_bad_get_filenameGs	zMFactoryTests.test_spec_from_file_location_loader_no_location_bad_get_filenamecCs�|jj|j|jd|jdd�}|j|j|j�|j|j|j�|j|j|j�|j|j	d�|j|j
d�|j|j|j�|j|j
�dS)Nr.r8)rr�rrr�r5r.r+r6r7r8r-r?r:)r	r1rrr�&test_spec_from_file_location_smsl_noneVs		z3FactoryTests.test_spec_from_file_location_smsl_nonecCs�|jj|j|jd|jdg�}|j|j|j�|j|j|j�|j|j|j�|j|j	d�|j|j
dg�|j|j|j�|j|j
�dS)Nr.r8rm)rr�rrr�r5r.r+r6r7r8r-r?r:)r	r1rrr�'test_spec_from_file_location_smsl_emptycs		z4FactoryTests.test_spec_from_file_location_smsl_emptycCs�|jj|j|jd|jddg�}|j|j|j�|j|j|j�|j|j|j�|j|j	d�|j|j
dg�|j|j|j�|j|j
�dS)Nr.r8r)rr�rrr�r5r.r+r6r7r8r-r?r:)r	r1rrr�+test_spec_from_file_location_smsl_not_emptyps	z8FactoryTests.test_spec_from_file_location_smsl_not_emptycCs�|jj|j|jd|j�}|j|j|j�|j|j|j�|j|j|j�|j|j	d�|j|j
dg�|j|j|j�|j|j
�dS)Nr.rm)rr�rrr�r5r.r+r6r7r8r-r?r:)r	r1rrr�)test_spec_from_file_location_smsl_default}sz6FactoryTests.test_spec_from_file_location_smsl_defaultcCs�Gdd�d�}|�}|jj|j|jd|�}|j|j|j�|j|j|�|j|j|j�|j|jd�|j|j	d�|j|j
|j
�|j|j�dS)Nc@seZdZdd�ZdS)zRFactoryTests.test_spec_from_file_location_smsl_default_not_package.<locals>.LoadercSsdS)NFr)r	rrrrr
�sz]FactoryTests.test_spec_from_file_location_smsl_default_not_package.<locals>.Loader.is_packageN)rrrr
rrrrr��sr�r.)
rr�rrr5r.r+r6r7r8r-r?r:)r	r�r.r1rrr�5test_spec_from_file_location_smsl_default_not_package�s		zBFactoryTests.test_spec_from_file_location_smsl_default_not_packagecCs�|jj|j|jd|j�}|j|j|j�|j|j|j�|j|j|j�|j|j	d�|j|j
d�|j|j|j�|j|j
�dS)Nr.)rr�rrr�r5r.r+r6r7r8r-r?r:)r	r1rrr�7test_spec_from_file_location_smsl_default_no_is_package�szDFactoryTests.test_spec_from_file_location_smsl_default_no_is_packagecCs�Gdd�d�}|�}|jj|j|jd|�}|j|j|j�|j|j|�|j|j|j�|j|jd�|j|j	d�|j|j
|j
�|j|j�dS)Nc@seZdZdd�ZdS)zUFactoryTests.test_spec_from_file_location_smsl_default_bad_is_package.<locals>.LoadercSs
t�dS)N)r�)r	rrrrr
�sz`FactoryTests.test_spec_from_file_location_smsl_default_bad_is_package.<locals>.Loader.is_packageN)rrrr
rrrrr��sr�r.)
rr�rrr5r.r+r6r7r8r-r?r:)r	r�r.r1rrr�8test_spec_from_file_location_smsl_default_bad_is_package�s		zEFactoryTests.test_spec_from_file_location_smsl_default_bad_is_packageN)rrrr4r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr��s2





r�c@seZdZeZeZdS)�Frozen_FactoryTestsN)rrrr'rrXr/rrrrr��sr�c@seZdZeZeZdS)�Source_FactoryTestsN)rrrrZrr[r/rrrrr��sr�)#rmrZimport_importlibZfrozen_initZsource_init�
_bootstrapr�r�rXr[r'rZZos.pathr�Ztest.supportrr�rBr#rrrr)ZTestCaserWrYr\r�r�r�r�r�r�r�r�rrrr�<module>s6		
��*U�7