403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python315/Lib/test/test_importlib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/test/test_importlib/__pycache__/test_namespace_pkgs.cpython-315.pyc
R
>lqj�2c�p�]PHs]PHs]PHs]PHs]PHs]PHs]PHs]PHs]QH G	s	\OQ2s\OQ2sQQ\O2sQQ\2sQQ	\2sQ
Q\2sQQ
\2sQQ\2sQQ\2sQQ\2sQQ\2sQQ\2sQQ\2sQQ\2sQQ\2sQQ\2sQ Q!\2sQ"Q#\2sQ$Q%\2sQ&Q'\2s\ Q(6Xc\OB2P!P!))�)�utilc#� �[Oo[OO2oPw�U[m[OO2[OO	U2P!S[m[OO2[OO	S2h9h3h)z�
Make sure sys.modules is the same object and has the same content
when exiting the context as when entering.

Similar to importlib.test.util.uncache, but doesn't require explicit
names.
)�sys�modules�copy�clear�update)�sys_modules_saved�sys_modules_copys  �<C:\Python315\\Lib\test\test_importlib\test_namespace_pkgs.py�sys_modules_contextrs���������{�{�'�'�)��-�
�'��������������+�,��(��������������+�,�s�0C�B�A
C�A
C�Cc	+�r �UOQ[O2UOQ[O2[O
Q-U@oS9^tt^2[
29^tt^2Pw�PPP2PPP2P!)%fhK9h)%fhP!9h3h)z�
Save import state and sys.modules cache and restore it on exit.
Typical usage:

>>> with namespace_tree_context(path=['/tmp/xxyy/portion1',
...         '/tmp/xxyy/portion2']):
...     pass
�	meta_path�
path_hooks�)�
setdefaultrrrr�import_stater)�kwargs�import_contexts, r�namespace_tree_contextr'si������k�3�=�=�1�
���l�C�N�N�3��&�&�0��0�N�	��,�.�.�
�/���.�.�����sB�A#B7�%B#�8B	�>B#�
B7�B 
�B 
�B#�#B4	�,B4	�.	B7c�`�\sQs]8snQs\OO\OO\	2Q2s
QsQsUs
P!)�NamespacePackageTestz^
Subclasses should define self.root and self.paths (under that root)
to be added to sys.path.
�namespace_pkgsc���UOTt,tFD-o[OOUOU2MJ/	toUmUO
[UO
Q52P!ttoh))�path)�paths�osr�join�root�resolved_paths�enterContextr)�selfrs& r�setUp�NamespacePackageTest.setUp?sV��6:�j�j�
�6@�d�B�G�G�L�L����D�)�j�
���	
���0�d�6I�6I�J�K��
s�5A3)r)�__name__�
__module__�__qualname__�__firstlineno__�__doc__rrr�dirname�__file__rr"�__static_attributes__�__classdictcell__��
__classdict__s@rrr8s:������7�7�<�<�������1�3C�D�D�L�L�rc�:`�\sQs]FsnQ,sQsQsQsQsUs	P!)�SingleNamespacePackage�portion1c�\�]PHoUOUOOQ2P!�r�portion1 foo one��foo.one�assertEqual�one�attr�r!�foos& r�test_simple_package�*SingleNamespacePackage.test_simple_packageI������������'9�:r/c��UO[29^tt^2]PH
oPPP2P!)%fhP!9h�r��assertRaises�ImportError�foo.twor;s& r�test_cant_import_other�-SingleNamespacePackage.test_cant_import_otherM�%��
�
�
�{�
+�
+��,�
+�
+�
+���.�?	�?	c�F�]PHoUO[U2Q2P!)rz <module 'foo' (namespace) from [)r7�assertStartsWith�reprr;s& r�test_simple_repr�'SingleNamespacePackage.test_simple_reprQs������d�3�i�)K�Lr/r)
r$r%r&r'rr=rFrMr+r,r-s@rr1r1Fs"����
�L�E�;��M�Mr/r1c�.`�\sQs]VsnQ,sQsQsUsP!)�DynamicPathNamespacePackager2c��]PHoUOUOOQ2UO	[
29^tt^2]PHoPPP2[OO[OOUOQ22]PHoUOUOOQ2P!)%fhK�9h)rr5�portion2�portion2 foo two)r7r8r9r:rCrDrErr�appendrrr�twor;s& r�test_dynamic_path�-DynamicPathNamespacePackage.test_dynamic_pathYs������������'9�:�
�
�
�{�
+�
+��,�	����������T�Y�Y�
�;�<�	���������'9�:�,�
+�s�	C	�	C	�C	r)r$r%r&r'rrVr+r,r-s@rrPrPVs����
�L�E�
;�
;r/rPc�.`�\sQs]isnQ,sQsQsUsP!)�CombinedNamespacePackages�
both_portionsc��]PHo]PHoUOUOOQ2UOUO
OQ2P!�rzboth_portions foo one�both_portions foo two�r7rEr8r9r:rUr;s& r�test_imports�&CombinedNamespacePackages.test_importsls:������������'>�?���������'>�?r/r�r$r%r&r'rr_r+r,r-s@rrYrYis����
��E�@�@r/rYc�0`�\sQs]ssnQQ,sQsQsUsP!)�SeparatedNamespacePackagesr2rRc��]PHo]PHoUOUOOQ2UOUO
OQ2P!)rr5rSr^r;s& rr_�'SeparatedNamespacePackages.test_importsvs:������������'9�:���������'9�:r/rrar-s@rrcrcss����
��$�E�;�;r/rcc�.`�\sQs]}snQ,sQsQsUsP!)�-SeparatedNamespacePackagesCreatedWhileRunningr2c	��[O29^tt^2o[OO	U2]PHoUO
UOOQ2UO[29^tt^2]PH.oPPP2[OOUQ2o[OU2[OOUQ2o[UQQQ59^tt^2oUO!Q2PPP2UO[29^tt^2]PH.oPPP2["O$2]PH.oUO
UO&OQ2PPP2P!)%fhCK
9h)%fhK�9h)%fhK�9h)%fhP!9h)	rr5r<zjust_created.py�wzutf-8)�encodingzattr = "just_created foo"zjust_created foo)�tempfile�TemporaryDirectoryrrrTr7r8r9r:rCrD�foo.just_createdrr�mkdir�open�write�	importlib�invalidate_caches�just_created)r!�temp_dirr<�namespace_path�module_path�files&     r�test_invalidate_caches�DSeparatedNamespacePackagesCreatedWhileRunning.test_invalidate_caches�s1��
�
(�
(�
*�
*�h�
�H�H�O�O�H�%�����S�W�W�\�\�+=�>��"�"�;�/�/�'�0�
 �W�W�\�\�(�E�:�N��H�H�^�$��'�'�,�,�~�7H�I�K��k�3��9�9�T��
�
�6�7�:��"�"�;�/�/�'�0�
�'�'�)�#����S�-�-�2�2�4F�G�7+�
*�0�/�/��:�9��0�/��++�
*�
*�sn�A'G�F	�A4G�?F 	�%G�6F3	�;AG�F
�F
�	G� F0
�)F0
�+G�3G
�<G
�>G�G	�G	r)r$r%r&r'rrxr+r,r-s@rrgrg}s����
�L�E�H�Hr/rgc�<`�\sQs]�snQQ,sQsQsQsQsUs	P!)�%SeparatedOverlappingNamespacePackagesr2rZc��]PHo]PHoUOUOOQ2UOUO
OQ2P!�rr5r]r^r;s& r�test_first_path_wins�:SeparatedOverlappingNamespacePackages.test_first_path_wins��:������������'9�:���������'>�?r/c���[OO2]PHo]PHoUOUOOQ2UOUOOQ2P!r\)	rr�reverser7rEr8r9r:rUr;s& r�test_first_path_wins_again�@SeparatedOverlappingNamespacePackages.test_first_path_wins_again�sJ������������������'>�?���������'>�?r/c��]PHo]PHoUOUOOQ2UOUO
OQ2P!r})rEr7r8r9r:rUr;s& r�+test_first_path_wins_importing_second_first�QSeparatedOverlappingNamespacePackages.test_first_path_wins_importing_second_first�r�r/r)
r$r%r&r'rr~r�r�r+r,r-s@rr{r{�s'����
��)�E�@�@�@�@r/r{c�4`�\sQs]�snQ,sQsQsQsUsP!)�SingleZipNamespacePackage�top_level_portion1.zipc�\�]PHoUOUOOQ2P!r4r6r;s& rr=�-SingleZipNamespacePackage.test_simple_package�r?r/c��UO[29^tt^2]PH
oPPP2P!)%fhP!9hrArBr;s& rrF�0SingleZipNamespacePackage.test_cant_import_other�rHrIr�	r$r%r&r'rr=rFr+r,r-s@rr�r��s����
%�&�E�;��r/r�c�0`�\sQs]�snQQ,sQsQsUsP!)�SeparatedZipNamespacePackagesr�rRc�H�]PHo]PHoUOUOOQ2UOUO
OQ2UO
QUOO2UOQUO
O2P!)rr5rSr��.zip)	r7rEr8r9r:rU�assertInr*�assertNotInr;s& rr_�*SeparatedZipNamespacePackages.test_imports�sm������������'9�:���������'9�:��
�
�.����0@�0@�A��������!1�!1�2r/rrar-s@rr�r��s����
%�z�2�E�3�3r/r�c�4`�\sQs]�snQ,sQsQsQsUsP!)�SingleNestedZipNamespacePackage�#nested_portion1.zip/nested_portion1c�\�]PHoUOUOOQ2P!r4r6r;s& rr=�3SingleNestedZipNamespacePackage.test_simple_package�r?r/c��UO[29^tt^2]PH
oPPP2P!)%fhP!9hrArBr;s& rrF�6SingleNestedZipNamespacePackage.test_cant_import_other�rHrIrr�r-s@rr�r��s����
2�3�E�;��r/r�c�0`�\sQs]�snQQ,sQsQsUsP!)�#SeparatedNestedZipNamespacePackagesr�rRc��]PHo]PHoUOUOOQ2UOUO
OQ2[OOQQ2oUOV!OO2UOQUO
O2P!)rr5rSznested_portion1.zip�nested_portion1r�)r7rEr8r9r:rUrrrr�r*r�)r!r<�fns&  rr_�0SeparatedNestedZipNamespacePackages.test_imports�s�������������'9�:���������'9�:�
�W�W�\�\�/�1B�
C���
�
�b�'�'�*�*�+��������!1�!1�2r/rrar-s@rr�r��s����
2�J�?�E�3�3r/r�c�0`�\sQs]�sn,QNsQsQsUsP!)�
LegacySupportc�(�]PHoUO[29^tt^2]PHoPPP2UO	QUO
2UO
Q[UO2O22P!)%fhKa9h)r�__init__�	namespace)
r7rCrDrEr�r*r��str�
__loader__�lowerr;s& r�+test_non_namespace_package_takes_precedence�9LegacySupport.test_non_namespace_package_takes_precedence�s[���
�
�
�{�
+�
+��,��
�
�j�#�,�,�/�����c�#�.�.�&9�&?�&?�&A�B�,�
+�s�B�B	�
B	r)�not_a_namespace_pkgr2rRrZ)r$r%r&r'rr�r+r,r-s@rr�r��s����L�E�C�Cr/r�c�6`�\sQs]�snQQ,sQsQsQsUsP!)�DynamicPathCalculation�project1�project2c�J�]PHoUO[UO2]2UO[UOO2]2]PHoUO[UO2]2UO[UOO2]2UOUOOOQ2UOUOOOQ2UO[29^tt^2]PH.oPPP2UO[UO2]2UO[UOO2]2P!)%fhKf9h)r�parent child one�parent child two)�parent.child.oner8�len�__path__�child�parent.child.twor9r:rUrCrD�parent.child.three�r!�parents& r�test_project3_fails�*DynamicPathCalculation.test_project3_fails�s�������V�_�_�-�q�1�����V�\�\�2�2�3�Q�7������V�_�_�-�q�1�����V�\�\�2�2�3�Q�7�������)�)�.�.�0B�C�������)�)�.�.�0B�C�
�
�
�{�
+�
+�%�,�	
����V�_�_�-�q�1�����V�\�\�2�2�3�Q�7�	,�
+�s�/F�F"	�F"	c�@�]PHoUO[UO2]2UO[UOO2]2]PHoUO[UO2]2UO[UOO2]2UOUOOOQ2UOUOOOQ2UO[29^tt^2]PH.oPPP2[OO[OO!UO"Q22]PH.oUO[UO2]2UO[UOO2]2UOUOO$OQ2P!)%fhK�9h)rr�r��project3zparent child three)r�r8r�r�r�r�r9r:rUrCrDr�rrrTrrr�threer�s& r�test_project3_succeeds�-DynamicPathCalculation.test_project3_succeedss_�������V�_�_�-�q�1�����V�\�\�2�2�3�Q�7������V�_�_�-�q�1�����V�\�\�2�2�3�Q�7�������)�)�.�.�0B�C�������)�)�.�.�0B�C�
�
�
�{�
+�
+�%�,�	����������T�Y�Y�
�;�<�!�	
����V�_�_�-�q�1�����V�\�\�2�2�3�Q�7�������+�+�0�0�2F�G�,�
+�s�/H
�
H	�H	r)	r$r%r&r'rr�r�r+r,r-s@rr�r��s ����
��$�E�8�"H�Hr/r�c�:`�\sQsQsnQ,sQsQsQsQsUs	P!)�ZipWithMissingDirectory�zmissing_directory.zipc�\�]PHoUOUOOQ2P!r4r6r;s& r�test_missing_directory�.ZipWithMissingDirectory.test_missing_directory*r?r/c�4�]PHoUOUQ2P!)rr9)r<�assertNotHasAttrr;s& r�test_missing_directory2�/ZipWithMissingDirectory.test_missing_directory2.s������c�5�)r/c�\�]PHoUOUOOQ2P!)rzmissing_directory foo two)�bar.twor8rUr:)r!�bars& r�test_present_directory�.ZipWithMissingDirectory.test_present_directory2s�����������'B�Cr/r)
r$r%r&r'rr�r�r�r+r,r-s@rr�r�s#����
$�%�E�;�*�D�Dr/r�c�.`�\sQsQsnQ,sQsQsUsP!)�"ModuleAndNamespacePackageInSameDir�7�module_and_namespace_packagec�H�]PHoUOUOQ2P!)rz	in module)�a_testr8r:)r!r�s& r�$test_module_before_namespace_package�GModuleAndNamespacePackageInSameDir.test_module_before_namespace_package:s��	�������k�2r/r)r$r%r&r'rr�r+r,r-s@rr�r�7s����
+�,�E�3�3r/r�c�.`�\sQsQsnP,sQsQsUsP!)�NamespaceSubpackageSameName�Ac��QoUO[29^tt^2o[OOOU2PPP2UO
WOOQ2P!)%fhK89h)zproject4.foo�project4)	rC�ModuleNotFoundErrorrq�	machinery�
PathFinder�	find_specr8�	exception�name)r!�submodule_path�cms&  r�4test_namespace_subpackage_shares_name_with_directory�PNamespaceSubpackageSameName.test_namespace_subpackage_shares_name_with_directoryDs_��'��
�
�
�2�
3�
3�r����*�*�4�4�^�D�4�	
������*�*�J�7�4�
3�s�*A;�;B	�B	r)r$r%r&r'rr�r+r,r-s@rr�r�As����
�D�E�8�8r/r�c�:`�\sQsQsnQ,sQsQsQsQsUs	P!)�ReloadTests�Lr2c��]PHo[OU2oUOUOO
Q2P!r4)r7rq�reloadr8r9r:r;s& rr=�ReloadTests.test_simple_packageOs.������s�#����������'9�:r/c�2�]PHoUO[29^tt^2]PHoPPP2[O
U2oUO[29^tt^2]PHoPPP2P!)%fhKR9h)%fhP!9hrA)r<rCrDrErqr�r;s& rrF�"ReloadTests.test_cant_import_otherTs_���
�
�
�{�
+�
+��,����s�#��
�
�
�{�
+�
+��,�
+�,�
+��,�
+�
+�s#�A2�#B�2B	�;B	�B	�B	c��]PHoUO[29^tt^2]PHoPPP2[O
O
[O
OUOQ22[OU2o]PHoUOUOOQ2P!)%fhK�9h)rrRrS)r7rCrDrErrrTrrrrqr�r8rUr:r;s& rrV�ReloadTests.test_dynamic_path\sz���
�
�
�{�
+�
+��,�	����������T�Y�Y�
�;�<����s�#��	���������'9�:�,�
+�s�B9�9C		�C		r)
r$r%r&r'rr=rFrVr+r,r-s@rr�r�Ls ����
�L�E�;�
�;�;r/r�c�@`�\sQsQsnQ,sQsQsQsQsQs	Us
P!)�LoaderTests�jr2c��]PHoUOUOUOO2UOUO2P!rA)r<r8r��__spec__�loader�assertIsNotNoner;s& r�!test_namespace_loader_consistency�-LoaderTests.test_namespace_loader_consistencyms5������������)<�)<�=����S�^�^�,r/c��]PHoUOUOO2UOUO2P!rA)r<�assertIsNoner��originr*r;s& r�!test_namespace_origin_consistency�-LoaderTests.test_namespace_origin_consistencyss/������#�,�,�-�-�.����#�,�,�'r/c��]PHo[OOUOQQ2oUOUO]*U2P!)rr2r<)r<rrrrr8r�)r!r<�
expected_paths&  r�test_path_indexable�LoaderTests.test_path_indexableys7��������T�Y�Y�
�E�B�
�������a��-�8r/c��]PHoUO[UO[O
O22UO[UO[OO22P!rA)	r<�
assertTrue�
isinstancer�rq�abc�Loaderr��NamespaceLoaderr;s& r�test_loader_abc�LoaderTests.test_loader_abcsI������
�3�>�>�9�=�=�3G�3G�H�I����
�3�>�>�9�3F�3F�3V�3V�W�Xr/r)r$r%r&r'rr�rrr
r+r,r-s@rr�r�js'����
�L�E�-�(�9�Y�Yr/r��__main__)"�
contextlibrq�
importlib.abc�importlib.machineryrrrk�unittest�test.test_importlibr�contextmanagerrr�TestCaserr1rPrYrcrgr{r�r�r�r�r�r�r�r�r�r�r�r$�mainrr/r�<module>rso������	�
���$����-��-�$������ L�8�,�,�L�
M�1�
M� ;�"6�;�&@� 4�@�;�!5�;�H�4H�H�D@�,@�@�.	� 4�	�	3�$8�	3�	�&:�	�
3�*>�
3�C�(�C�*H�1�*H�ZD�2�D�03�)=�3�8�"6�8�;�&�;�<Y�&�Y�6�z���M�M�O�r/

Youez - 2016 - github.com/yon3zu
LinuXploit