Your IP : 216.73.216.213


Current Path : /opt/alt/python311/lib64/python3.11/test/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/test/__pycache__/test_ntpath.cpython-311.opt-2.pyc

�

�0�i������ddlZddlZddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZmZddl
mZddlmZddlmZ	ddlZn
#e$rdZYnwxYw	ejdZn
#e$rd	ZYnwxYw	ddlZdZd
�Zn
#e$rd	ZYnwxYwd�Zd�Zd
�ZGd�dej��ZGd�de��ZGd�dej ej��Z!Gd�de��Z"e#dkrej$��dSdS)�N)�
ALLOW_MISSING)�support)�	os_helper�
is_emscripten)�FakePath)�test_genericpath)�
TemporaryFileTFc��tjdd���j}tjtjtjg|_tj|_||dd��}|s3td�tj	�������tj
|��}||||��}|d|�S)N�kernel32T)�use_last_errorrz&failed to get short path name 0x{:08X})�ctypes�WinDLL�GetShortPathNameW�	c_wchar_p�c_uint32�argtypes�restype�OSError�format�get_last_error�create_unicode_buffer)�path�GSPN�
result_len�results    �7/opt/alt/python311/lib64/python3.11/test/test_ntpath.py�_getshortpathnamer$s����}�Z��=�=�=�O���)�6�+;�V�_�M��
������T�$��a�(�(�
��	<��B�!�6�&�"7�"9�"9�:�:�<�<�
<��-�j�9�9���T�$��
�3�3�
��k�z�k�"�"�c���t|tttjf��r&tjtj|����St|d��rtd�|D����S|S)N�__iter__c3�bK�|]*}tjtj|����V��+dS�N)�ntpath�normcase�os�fsdecode��.0�ps  r�	<genexpr>z_norm.<locals>.<genexpr>4s4����C�C��V�_�R�[��^�^�4�4�C�C�C�C�C�Cr)
�
isinstance�bytes�strr%�PathLiker#r$r&�hasattr�tuple)rs r�_normr10sm���$���R�[�1�2�2�D���r�{�4�0�0�1�1�1�	��z�	"�	"�D��C�C�d�C�C�C�C�C�C��Krc	�8�|�dd��}t|��}||krct|��t|��krCtjt|���dt|���dt|�������|�dd��}|�dd��}|�d	d
��}|�dd��}|�d
d��}|�dd��}t
j|���d��}|�	dd���d��}tj��5tjdt��t|��}ddd��n#1swxYwYt|��t|��krCtjt|���dt|���dt|�������dS)N�\�\\z should return: z but returned: z('z(b'z("z(b"z['z[b'z["z[b"z, 'z, b'z, "z, b"�latin1�ascii�backslashreplace�ignore)�replace�evalr1r�
TestFailedr-r%�fsencode�decode�encode�warnings�catch_warnings�simplefilter�DeprecationWarning�repr)�fn�
wantResult�	gotResults   r�testerrG8s��	���D�&�	!�	!�B��R���I��Y���5��#4�#4��i�8H�8H�#H�#H�� ��B������Z�����#�i�.�.�.�":�;�;�	;�
���D�%�	 �	 �B�	���D�%�	 �	 �B�	���D�%�	 �	 �B�	���D�%�	 �	 �B�	���E�6�	"�	"�B�	���E�6�	"�	"�B�	��R���	�	��	)�	)�B�	���7�.�	/�	/�	6�	6�w�	?�	?�B�	�	 �	"�	"�����h�(:�;�;�;���H�H�	�������������������
�Z���E�)�,�,�,�,�� ��B������Z�����$�y�/�/�/�";�<�<�	<�-�,s�6*F,�,F0�3F0c���	�fd�}|S)Nc������fd�}|S)Nc����D]Q}|�|��5�|g|�|�Ri|��ddd��n#1swxYwY|����RdSr")�subTest�
doCleanups)�self�args�kwargs�	parameter�func�
parameterss    ��r�_parameterizedzE_parameterize.<locals>._parametrize_decorator.<locals>._parameterized\s����'�
"�
"�	��\�\�)�,�,�;�;��D��:��:�i�:�:�:�6�:�:�:�;�;�;�;�;�;�;�;�;�;�;����;�;�;�;����!�!�!�!�
"�
"s�6�:	�:	�)rQrSrRs` �r�_parametrize_decoratorz-_parameterize.<locals>._parametrize_decorator[s*����	"�	"�	"�	"�	"�	"�
�rrT)rRrUs` r�
_parameterizerVPs)���	������"�!rc��eZdZd�Zd�ZdS)�NtpathTestCasec��||ks t|��t|��krdS|�||��dSr")r1�assertEqual)rM�path1�path2s   r�assertPathEqualzNtpathTestCase.assertPathEqualfsB���E�>�>�U�5�\�\�U�5�\�\�9�9��F������&�&�&�&�&rc�f�|�t|��t|����dSr")�assertInr1)rMr�pathsets   r�assertPathInzNtpathTestCase.assertPathInks(���
�
�e�D�k�k�5��>�>�2�2�2�2�2rN)�__name__�
__module__�__qualname__r]rarTrrrXrXes2������'�'�'�
3�3�3�3�3rrXc��eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zejejed��eiddidei��d�������Zejejed��d�����Zejed��d���Zejed��eiddidei��d�����Zejejed��eiddidei��d�������Zejejed��d�����Zejejed��d�����Zejejed��d�����Zejejed��d�����Zejejed��eiddidei��d�������Z ejed��d���Z!ejed��eje"d��d�����Z#d�Z$ejej%d��d ���Z&e'j(d!��d"���Z)d#�Z*eje+d$��d%���Z,d&�Z-d'�Z.ej/e0d(��d)���Z1d*�Z2d+�Z3eje+d,��d-���Z4d.S)/�
TestNtpathc�F�tdd��tdd��tdd��tdd��td	d
��tdd��td
d��tdd��tdd��tdd��dS)Nzntpath.splitext("foo.ext"))�foo�.extzntpath.splitext("/foo/foo.ext"))z/foo/foorizntpath.splitext(".ext"))ri�zntpath.splitext("\foo.ext\foo"))z\foo.ext\foorjzntpath.splitext("foo.ext\"))zfoo.ext\rjzntpath.splitext(""))rjrjzntpath.splitext("foo.bar.ext"))zfoo.barriz!ntpath.splitext("xx/foo.bar.ext"))z
xx/foo.barriz!ntpath.splitext("xx\foo.bar.ext"))z
xx\foo.barrizntpath.splitext("c:a/b\c.d"))zc:a/b\cz.d�rG�rMs r�
test_splitextzTestNtpath.test_splitextps����+�_�=�=�=��0�2F�G�G�G��(�,�7�7�7��2�4J�K�K�K��-�/@�A�A�A��$�h�/�/�/��/�1D�E�E�E��2�4J�K�K�K��3�5L�M�M�M��.�0B�C�C�C�C�Crc�v�tdd��tdd��tdd��tdd��td	d
��tdd��td
d��tdd��|�tjd��d��tdd��tdd��tdd��tdd��tdd��tdd��tdd ��td!d"��td#d$��td%d&��td'd(��td)d*��td+d,��td-d.��td/d0��td1d2��td3d4��td5d6��td7d8��td9d:��td;d<��td=d>��td?d@��tdAdB��tdCdD��dS)ENzntpath.splitdrive("c:\foo\bar"))�c:�\foo\barzntpath.splitdrive("c:/foo/bar"))ro�/foo/barz/ntpath.splitdrive("\\conky\mountpoint\foo\bar"))z\\conky\mountpointrpz/ntpath.splitdrive("//conky/mountpoint/foo/bar"))z//conky/mountpointrqz0ntpath.splitdrive("\\\conky\mountpoint\foo\bar"))z\\\conky�\mountpoint\foo\barz0ntpath.splitdrive("///conky/mountpoint/foo/bar"))z///conky�/mountpoint/foo/barz0ntpath.splitdrive("\\conky\\mountpoint\foo\bar"))z\\conky\rrz0ntpath.splitdrive("//conky//mountpoint/foo/bar"))z//conky/rsu//conky/MOUNTPOİNT/foo/bar)u//conky/MOUNTPOİNTrqzntpath.splitdrive("//?/c:"))�//?/c:rjzntpath.splitdrive("//?/c:/"))rt�/zntpath.splitdrive("//?/c:/dir"))rt�/dirzntpath.splitdrive("//?/UNC"))z//?/UNCrjzntpath.splitdrive("//?/UNC/"))z//?/UNC/rjz$ntpath.splitdrive("//?/UNC/server/"))z//?/UNC/server/rjz)ntpath.splitdrive("//?/UNC/server/share"))�//?/UNC/server/sharerjz-ntpath.splitdrive("//?/UNC/server/share/dir"))rwrvzJntpath.splitdrive("//?/VOLUME{00000000-0000-0000-0000-000000000000}/spam"))z0//?/VOLUME{00000000-0000-0000-0000-000000000000}z/spamz'ntpath.splitdrive("//?/BootPartition/"))z//?/BootPartitionruzntpath.splitdrive("\\?\c:"))�\\?\c:rjzntpath.splitdrive("\\?\c:\"))rxr3zntpath.splitdrive("\\?\c:\dir"))rx�\dirzntpath.splitdrive("\\?\UNC"))z\\?\UNCrjzntpath.splitdrive("\\?\UNC\"))z\\?\UNC\rjz$ntpath.splitdrive("\\?\UNC\server\"))z\\?\UNC\server\rjz)ntpath.splitdrive("\\?\UNC\server\share"))�\\?\UNC\server\sharerjz-ntpath.splitdrive("\\?\UNC\server\share\dir"))rzryzJntpath.splitdrive("\\?\VOLUME{00000000-0000-0000-0000-000000000000}\spam"))z0\\?\VOLUME{00000000-0000-0000-0000-000000000000}z\spamz'ntpath.splitdrive("\\?\BootPartition\"))z\\?\BootPartitionr3zntpath.splitdrive("//"))z//rjzntpath.splitdrive("///"))z///rjzntpath.splitdrive("///y"))z///yrjzntpath.splitdrive("//x"))z//xrjzntpath.splitdrive("//x/"))z//x/rj)rGrZr#�
splitdriverls r�test_splitdrivezTestNtpath.test_splitdrive|s����2�#�	%�	%�	%��0�!�	#�	#�	#��E�6�	8�	8�	8��@�1�	3�	3�	3��G�5�	7�	7�	7��A�/�	1�	1�	1��G�8�	:�	:�	:��A�2�	4�	4�	4�	
����*�+H�I�I�<�	>�	>�	>�	�,�n�=�=�=��-��?�?�?��0�2D�E�E�E��-��?�?�?��.�0@�A�A�A��5�7N�O�O�O��:�<X�Y�Y�Y��>�@`�a�a�a��[�L�	N�	N�	N��8�:T�U�U�U��/�1B�C�C�C��1�3F�G�G�G��4�6L�M�M�M��0�2D�E�E�E��2�4H�I�I�I��:�<X�Y�Y�Y��?�Ab�c�c�c��D�5�	7�	7�	7��_�P�	R�	R�	R��<�>\�]�]�]�	�(�*�5�5�5��)�;�7�7�7��*�L�9�9�9��)�;�7�7�7��*�L�9�9�9�9�9rc���tdd��tdd��tdd��tdd��td	d
��tdd��dS)
Nzntpath.split("c:\foo\bar"))zc:\foo�barz*ntpath.split("\\conky\mountpoint\foo\bar"))z\\conky\mountpoint\foor~zntpath.split("c:\"))�c:\rjz#ntpath.split("\\conky\mountpoint\"))z\\conky\mountpoint\rjzntpath.split("c:/"))�c:/rjz#ntpath.split("//conky/mountpoint/"))z//conky/mountpoint/rjrkrls r�
test_splitzTestNtpath.test_split�s����-�/A�B�B�B��@�4�	6�	6�	6�	�%�|�4�4�4��8�.�	0�	0�	0�	�$�k�2�2�2��4�6Q�R�R�R�R�Rrc���tdd��tdd��tdd��tdd��tdd��tdd��dS)Nzntpath.isabs("c:\")�z#ntpath.isabs("\\conky\mountpoint\")zntpath.isabs("\foo")zntpath.isabs("\foo\bar")z"ntpath.isabs("\\conky\mountpoint")zntpath.isabs("\\.\C:")rkrls r�
test_isabszTestNtpath.test_isabs�sp���%�q�)�)�)��8�!�<�<�<��&��*�*�*��+�Q�/�/�/�	�6��:�:�:��*�A�.�.�.�.�.rc�f�tdd��tdd��tdd��dS)Nz>ntpath.commonprefix(["/home/swenson/spam", "/home/swen/spam"])z
/home/swenz;ntpath.commonprefix(["\home\swen\spam", "\home\swen\eggs"])z\home\swen\z;ntpath.commonprefix(["/home/swen/spam", "/home/swen/spam"])z/home/swen/spamrkrls r�test_commonprefixzTestNtpath.test_commonprefix�sT���O��	�	�	��R��	!�	!�	!��L� �	"�	"�	"�	"�	"rc	���tdd��tdd��tdd��tdd��tdd	��td
d��tdd
��tdd��tdd��tdd��tdd��tdd��tdd��tdd��tdd��tdd��tdd��tdd��tdd��td d��td!d"��td#d$��td%d&��td'd(��td)d*��td+d,��td-d.��td/d0��td1d2��td3d4��td5d6��td7d8��td9d:��td;d<��td=d<��td>d0��td?d0��td@d0��tdAd0��tdBd8��tdCd8��tdDd8��tdEdF��tdGdH��tdIdJ��tdKdL��dMD]}dND]}tdO|�dP|�dQ�|����tdRdS��tdTdS��tdUdS��tdVdW��tdXdY��tdZd[��dS)\Nzntpath.join("")rjzntpath.join("", "", "")zntpath.join("a")�azntpath.join("/a")z/azntpath.join("\a")�\azntpath.join("a:")za:zntpath.join("a:", "\b")za:\bzntpath.join("a", "\b")z\bzntpath.join("a", "b", "c")za\b\czntpath.join("a\", "b", "c")zntpath.join("a", "b\", "c")zntpath.join("a", "b", "\c")z\czntpath.join("d:\", "\pleep")zd:\pleepzntpath.join("d:\", "a", "b")zd:\a\bzntpath.join('', 'a')z ntpath.join('', '', '', '', 'a')zntpath.join('a', '')za\z ntpath.join('a', '', '', '', '')zntpath.join('a\', '')z!ntpath.join('a\', '', '', '', '')zntpath.join('a/', '')za/zntpath.join('a/b', 'x/y')za/b\x/yzntpath.join('/a/b', 'x/y')z/a/b\x/yzntpath.join('/a/b/', 'x/y')z/a/b/x/yzntpath.join('c:', 'x/y')zc:x/yzntpath.join('c:a/b', 'x/y')z	c:a/b\x/yzntpath.join('c:a/b/', 'x/y')z	c:a/b/x/yzntpath.join('c:/', 'x/y')zc:/x/yzntpath.join('c:/a/b', 'x/y')z
c:/a/b\x/yzntpath.join('c:/a/b/', 'x/y')z
c:/a/b/x/yz&ntpath.join('//computer/share', 'x/y')z//computer/share\x/yz'ntpath.join('//computer/share/', 'x/y')z//computer/share/x/yz*ntpath.join('//computer/share/a/b', 'x/y')z//computer/share/a/b\x/yzntpath.join('a/b', '/x/y')z/x/yzntpath.join('/a/b', '/x/y')zntpath.join('c:', '/x/y')zntpath.join('c:a/b', '/x/y')zntpath.join('c:/', '/x/y')zntpath.join('c:/a/b', '/x/y')z'ntpath.join('//computer/share', '/x/y')z(ntpath.join('//computer/share/', '/x/y')z)ntpath.join('//computer/share/a', '/x/y')zntpath.join('c:', 'C:x/y')zC:x/yzntpath.join('c:a/b', 'C:x/y')z	C:a/b\x/yzntpath.join('c:/', 'C:x/y')zC:/x/yzntpath.join('c:/a/b', 'C:x/y')z
C:/a/b\x/y)
rjza/bz/a/brozc:a/br�zc:/a/bz//computer/sharez//computer/share/z//computer/share/a/b)zd:zd:x/yzd:/zd:/x/yz//machine/commonz//machine/common/z//machine/common/x/yzntpath.join(z, �)z*ntpath.join('\\computer\share\', 'a', 'b')z\\computer\share\a\bz)ntpath.join('\\computer\share', 'a', 'b')z&ntpath.join('\\computer\share', 'a\b')z*ntpath.join('//computer/share/', 'a', 'b')z//computer/share/a\bz)ntpath.join('//computer/share', 'a', 'b')z//computer/share\a\bz&ntpath.join('//computer/share', 'a/b')z//computer/share\a/brk)rM�x�ys   r�	test_joinzTestNtpath.test_join�s���� �"�%�%�%��(�"�-�-�-��!�3�'�'�'��"�D�)�)�)��#�U�+�+�+��"�D�)�)�)��)�7�3�3�3��(�%�0�0�0��+�Y�7�7�7��-�y�9�9�9��-�y�9�9�9��-�u�5�5�5��/��=�=�=��.�
�;�;�;��%�s�+�+�+��1�3�7�7�7��%�u�-�-�-��1�5�9�9�9��'��/�/�/��3�U�;�;�;��&��-�-�-��*�J�7�7�7��+�[�9�9�9��,�j�9�9�9��)�7�3�3�3��,�l�;�;�;��-�{�;�;�;��*�H�5�5�5��-�}�=�=�=��.��=�=�=��7�9P�Q�Q�Q��8�:P�Q�Q�Q��;�=X�Y�Y�Y��+�V�4�4�4��,�f�5�5�5��*�H�5�5�5��-�x�8�8�8��+�X�6�6�6��.��9�9�9��8�:P�Q�Q�Q��9�;Q�R�R�R��:�<R�S�S�S��+�W�5�5�5��.��=�=�=��,�h�7�7�7��/��?�?�?�S�	:�	:�A�W�
:�
:�������1�1�1�5�q�9�9�9�9�
:�	�?�A\�]�]�]��=�?Z�[�[�[��;�=X�Y�Y�Y��;�=T�U�U�U��:�<T�U�U�U��7�9P�Q�Q�Q�Q�Qrc�F�tdd��tdd��tdd��tdd��tdd��td	d
��tdd��td
d��tdd��tdd��tdd��tdd��tdd��tdd��tdd��tdd��tdd��tdd��td d!��td"d#��td$d%��td&d'��td(d)��td*d+��td,d-��td.d/��td0d1��td2d1��td3d1��td4d1��td5d6��td7d8��td9d:��td;d<��dS)=Nz$ntpath.normpath('A//////././//.//B')zA\Bzntpath.normpath('A/./B')zntpath.normpath('A/foo/../B')zntpath.normpath('C:A//B')zC:A\Bzntpath.normpath('D:A/./B')zD:A\Bzntpath.normpath('e:A/foo/../B')ze:A\Bzntpath.normpath('C:///A//B')zC:\A\Bzntpath.normpath('D:///A/./B')zD:\A\Bz"ntpath.normpath('e:///A/foo/../B')ze:\A\Bzntpath.normpath('..')�..zntpath.normpath('.')�.zntpath.normpath('')zntpath.normpath('/')r3zntpath.normpath('c:/')rzntpath.normpath('/../.././..')zntpath.normpath('c:/../../..')zntpath.normpath('../.././..')�..\..\..zntpath.normpath('K:../.././..')z
K:..\..\..zntpath.normpath('C:////a/b')zC:\a\bz'ntpath.normpath('//machine/share//a/b')z\\machine\share\a\bzntpath.normpath('\\.\NUL')�\\.\NULzntpath.normpath('\\?\D:/XY\Z')z\\?\D:/XY\Zz1ntpath.normpath('handbook/../../Tests/image.png')z..\Tests\image.pngz4ntpath.normpath('handbook/../../../Tests/image.png')z..\..\Tests\image.pngz.ntpath.normpath('handbook///../a/.././../b/c')z..\b\cz/ntpath.normpath('handbook/a/../..///../../b/c')z	..\..\b\cz$ntpath.normpath('//server/share/..')�\\server\share\z%ntpath.normpath('//server/share/../')z'ntpath.normpath('//server/share/../..')z(ntpath.normpath('//server/share/../../')zntpath.normpath('\\foo\\')z\\foo\\zntpath.normpath('\\foo\')z\\foo\zntpath.normpath('\\foo')z\\foozntpath.normpath('\\')r4rkrls r�
test_normpathzTestNtpath.test_normpathsS���5�v�>�>�>��)�6�2�2�2��.��7�7�7��*�H�5�5�5��+�X�6�6�6��0�(�;�;�;��-�y�9�9�9��.�	�:�:�:��3�Y�?�?�?��&��.�.�.��%�t�,�,�,��$�d�+�+�+��%�t�,�,�,��'��0�0�0��/��6�6�6��/��8�8�8��.��<�<�<��0�-�@�@�@��-�y�9�9�9��8�:P�Q�Q�Q��.�
�;�;�;��3�^�D�D�D��B�DY�Z�Z�Z��E�G_�`�`�`��?��K�K�K��@�,�O�O�O��5�;P�Q�Q�Q��6�;P�Q�Q�Q��8�;P�Q�Q�Q��9�;P�Q�Q�Q�	�/��?�?�?��-�{�;�;�;��+�Y�7�7�7��(�&�1�1�1�1�1rc���tjtj����}t	d|��t	d|��t	d|��t	d|��t	d|��dS)Nzntpath.realpath('.')zntpath.realpath('./.')z&ntpath.realpath('/'.join(['.'] * 100))zntpath.realpath('.\.')z&ntpath.realpath('\'.join(['.'] * 100))�r#�normpathr%�getcwdrG�rM�expecteds  r�test_realpath_curdirzTestNtpath.test_realpath_curdir;sr���?�2�9�;�;�/�/���%�x�0�0�0��'��2�2�2��7��B�B�B��(�(�3�3�3��8�(�C�C�C�C�Crc���tjtj����}t	d|��t	d|��t	d|��t	d|��t	d|��dS)Nz!ntpath.realpath('.', strict=True)z#ntpath.realpath('./.', strict=True)z3ntpath.realpath('/'.join(['.'] * 100), strict=True)z#ntpath.realpath('.\.', strict=True)z3ntpath.realpath('\'.join(['.'] * 100), strict=True)r�r�s  r�test_realpath_curdir_strictz&TestNtpath.test_realpath_curdir_strictCsr���?�2�9�;�;�/�/���2�H�=�=�=��4�h�?�?�?��D�h�O�O�O��5�x�@�@�@��E�x�P�P�P�P�Prc���tjtj����}t	d|��t	d|��t	d|��t	d|��t	d|��dS)Nz*ntpath.realpath('.', strict=ALLOW_MISSING)z,ntpath.realpath('./.', strict=ALLOW_MISSING)z<ntpath.realpath('/'.join(['.'] * 100), strict=ALLOW_MISSING)z,ntpath.realpath('.\.', strict=ALLOW_MISSING)z<ntpath.realpath('\'.join(['.'] * 100), strict=ALLOW_MISSING)r�r�s  r�test_realpath_curdir_missing_okz*TestNtpath.test_realpath_curdir_missing_okKs����?�2�9�;�;�/�/���;��	�	�	��=��	�	�	��M��	�	�	��>��	�	�	��N��	�	�	�	�	rc��tjtj����}t	dtj|����t	dtjtj|������t	dtj|��ddz��t	dtjtj|������t	dtj|��ddz��dS)Nzntpath.realpath('..')zntpath.realpath('../..')z&ntpath.realpath('/'.join(['..'] * 50))rr3zntpath.realpath('..\..')z&ntpath.realpath('\'.join(['..'] * 50))�r#r�r%r�rG�dirnamer{r�s  r�test_realpath_pardirzTestNtpath.test_realpath_pardirXs����?�2�9�;�;�/�/���&���x�(@�(@�A�A�A��)��~�f�n�X�6�6�7�7�	9�	9�	9��7�� ��*�*�1�-��4�	6�	6�	6��*��~�f�n�X�6�6�7�7�	9�	9�	9��8�� ��*�*�1�-��4�	6�	6�	6�	6�	6rc��tjtj����}t	dtj|����t	dtjtj|������t	dtj|��ddz��t	dtjtj|������t	dtj|��ddz��dS)Nz"ntpath.realpath('..', strict=True)z%ntpath.realpath('../..', strict=True)z3ntpath.realpath('/'.join(['..'] * 50), strict=True)rr3z%ntpath.realpath('..\..', strict=True)z3ntpath.realpath('\'.join(['..'] * 50), strict=True)r�r�s  r�test_realpath_pardir_strictz&TestNtpath.test_realpath_pardir_strictds����?�2�9�;�;�/�/���3�V�^�H�5M�5M�N�N�N��6��~�f�n�X�6�6�7�7�	9�	9�	9��D�� ��*�*�1�-��4�	6�	6�	6��7��~�f�n�X�6�6�7�7�	9�	9�	9��E�� ��*�*�1�-��4�	6�	6�	6�	6�	6rc��tjtj����}t	dtj|����t	dtjtj|������t	dtj|��ddz��t	dtjtj|������t	dtj|��ddz��dS)Nz+ntpath.realpath('..', strict=ALLOW_MISSING)z.ntpath.realpath('../..', strict=ALLOW_MISSING)z<ntpath.realpath('/'.join(['..'] * 50), strict=ALLOW_MISSING)rr3z.ntpath.realpath('..\..', strict=ALLOW_MISSING)z<ntpath.realpath('\'.join(['..'] * 50), strict=ALLOW_MISSING)r�r�s  r�test_realpath_pardir_missing_okz*TestNtpath.test_realpath_pardir_missing_okps����?�2�9�;�;�/�/���<��~�h�'�'�	)�	)�	)��?��~�f�n�X�6�6�7�7�	9�	9�	9��M�� ��*�*�1�-��4�	6�	6�	6��@��~�f�n�X�6�6�7�7�	9�	9�	9��N�� ��*�*�1�-��4�	6�	6�	6�	6�	6rzneed _getfinalpathname�strictTc��tjtj��}t	|d�����|�tj|��|�tj|dz��tj	||dz��|�
tj|dzfi|��|��|�
tjtj|dz��fi|��tj|����tjD]}|�d�}tj|��sn�t!d���|�tj|��|��|rT|�t ��5tjtjdzfi|��ddd��dS#1swxYwYdS|�|dztjtjdzfi|����dS)N�wb�1z:\zNo free drive letters availablezspam)r#�abspathr�TESTFN�open�close�
addCleanup�unlinkr%�symlinkr]�realpathr<�string�ascii_uppercase�existsrrZ�assertRaises)rMrO�ABSTFN�c�ds     r�test_realpath_basiczTestNtpath.test_realpath_basic}sT����	� 0�1�1���V�T��� � �"�"�"����	�(�&�1�1�1����	�(�&�3�,�7�7�7�
�
�6�6�C�<�(�(�(����V�_�V�c�\�D�D�V�D�D�f�M�M�M����V�_�R�[��#��-F�-F�Q�Q�&�Q�Q���V�,�,�	.�	.�	.�
�'�	=�	=�A��	�	�	�A��=��#�#�
���
��;�<�<�<�������+�+�Q�/�/�/��	X��"�"�7�+�+�
*�
*���	� 0�8� ;�*�*�"(�*�*�*�
*�
*�
*�
*�
*�
*�
*�
*�
*�
*�
*�
*����
*�
*�
*�
*�
*�
*�
���V�h�.� &��	�0@�8�0K� V� V�v� V� V�
X�
X�
X�
X�
Xs� F<�<G�Gc�X�tjtj��}t	j|dz|��|�tj|��|�ttj
|d���|�ttj
|dzd���dS)Nr�T�r��2)r#r�rr�r%r�r�r�r��FileNotFoundErrorr��rMr�s  r�test_realpath_strictzTestNtpath.test_realpath_strict�s���
��	� 0�1�1��
�
�6�C�<��(�(�(����	�(�&�1�1�1����+�V�_�f�T��R�R�R����+�V�_�f�s�l�SW��X�X�X�X�Xrc���tj}tjtj��}tj|��}|dz}|�||d���|��|�ttj|d���|�ttj|t���|dz}|�||d���|��|�ttj|d���|�ttj|t���|dz}|�||d���|��|�ttj|d���|�ttj|t���|dz}|�||d���|��|�ttj|d���|�ttj|t���|dz}|�||d���tj����|�||d���tj����|�||t���tj����|d	z}|�||d���tj����|�||d���tj����|�||t���tj����|d
z}|�||d���|dz��|�ttj|d���|�||t���|dz��|dz}|�||d���|d
z��|�ttj|d���|�||t���|d
z��dS)N�Fr�T�z\nonexistent\xs\nonexistent\xz\..s\..z\nonexistent\x\..z\nonexistents\nonexistent\x\..s\nonexistent)
r#r�r�rr�r%r<rZr�rrr��getcwdb)rMr�r��ABSTFNbrs     r�test_realpath_invalid_pathsz&TestNtpath.test_realpath_invalid_paths�s����?����	� 0�1�1���+�f�%�%�����������$�u�5�5�5�t�<�<�<����'�6�?�D���F�F�F����'�6�?�D���O�O�O��� �������$�u�5�5�5�t�<�<�<����'�6�?�D���F�F�F����'�6�?�D���O�O�O��.�.�������$�u�5�5�5�t�<�<�<����'�6�?�D���F�F�F����'�6�?�D���O�O�O��0�0�������$�u�5�5�5�t�<�<�<����'�6�?�D���F�F�F����'�6�?�D���O�O�O��
�"�������$�u�5�5�5�r�y�{�{�C�C�C������$�t�4�4�4�b�i�k�k�B�B�B������$�}�=�=�=�r�y�{�{�K�K�K���$�������$�u�5�5�5�r�z�|�|�D�D�D������$�t�4�4�4�b�j�l�l�C�C�C������$�}�=�=�=�r�z�|�|�L�L�L��2�2�������$�u�5�5�5�v��7O�P�P�P����'�6�?�D���F�F�F������$�}�=�=�=�v��?W�X�X�X��4�4�������$�u�5�5�5�w�AQ�7Q�R�R�R����'�6�?�D���F�F�F������$�}�=�=�=�w�IY�?Y�Z�Z�Z�Z�Zrc��tj}tjtj��}tj|��}|dz}|jttj|fi|��|jttj|fi|��|dz}|jttj|fi|��|jttj|fi|��|dz}|jttj|fi|��|jttj|fi|��|dz}|jttj|fi|��|jttj|fi|��dS)N��s\nonexistent\�s�\..s\nonexistent\�\..)	r#r�r�rr�r%r<r��UnicodeDecodeError)rMrOr�r�r�rs      r�#test_realpath_invalid_unicode_pathsz.TestNtpath.test_realpath_invalid_unicode_paths�sl���?����	� 0�1�1���+�f�%�%���� �����,�f�o�t�N�N�v�N�N�N����,�f�o�t�N�N�v�N�N�N��/�/�����,�f�o�t�N�N�v�N�N�N����,�f�o�t�N�N�v�N�N�N���$�����,�f�o�t�N�N�v�N�N�N����,�f�o�t�N�N�v�N�N�N��3�3�����,�f�o�t�N�N�v�N�N�N����,�f�o�t�N�N�v�N�N�N�N�Nrc��tjtj��}t	|d�����|�tj|��|�tj|dz��tj	|tj
|dz����|�tj|dzfi|��|��dS)Nr�r�)
r#r�rr�r�r�r�r�r%r��relpathr]r�)rMrOr�s   r�test_realpath_relativez!TestNtpath.test_realpath_relative�s�����	� 0�1�1���V�T��� � �"�"�"����	�(�&�1�1�1����	�(�&�3�,�7�7�7�
�
�6�6�>�&�3�,�7�7�8�8�8����V�_�V�c�\�D�D�V�D�D�f�M�M�M�M�Mrc�|	�tjtj��}t	j|��|�tj|��tj|��5t	jd��t	j	d��t	j
dd��t	j
dd��t	j	d��t	j
dd��t	j
dd��t	j
d	d
��t	j
dd��t	j
d
d��t	j
|dzd��t	j
dd��|�tjd��|dz��|�tjd��|dz��|�tjd
��|dz��|�tjd��|dz��|�tjd��|dz��|�tjd��|dz��|�tjd��|dz��|�tjd��|dz��|�tjd��t	j
|dz����|�tjd��t	j
|dz����|�tjd��t	j
|dz����|�tjd��t	j
|dz����|�tjd��t	j
|dz����|�tjd ��t	j
|dz����|�tjd!��t	j
|dz����|�tjd"��t	j
|dz����ddd��dS#1swxYwYdS)#N�subdirr��	recursiver��parentrM�missing�brokenz
broken\bar�broken1zself\self\broken�broken2z"subdir\parent\subdir\parent\broken�broken3z\broken�broken4zrecursive\..\broken�broken5z\missingz
broken\fooz\missing\fooz\broken\barzbroken1\bazz\broken\bar\bazz\self\self\missingz$\subdir\parent\subdir\parent\missingsbrokens
broken\foosbroken1sbroken1\bazsbroken2sbroken3sbroken4sbroken5)r#r�rr�r%�mkdirr��rmtree�
change_cwd�chdirr�r]r�r<r�s  r�test_realpath_broken_symlinksz(TestNtpath.test_realpath_broken_symlinks�s�����	� 0�1�1��
���������	�(�&�1�1�1�
�
!�&�
)�
)�0	D�0	D��H�X�����H�X�����J�s�K�(�(�(��J�t�X�&�&�&��H�T�N�N�N��J�s�F�#�#�#��J�y�(�+�+�+��J�}�i�0�0�0��J�*�I�6�6�6��J�<�i�H�H�H��J�v�
�*�I�6�6�6��J�-�y�9�9�9�� � ����!:�!:�!'�+�!5�
7�
7�
7�� � ����!?�!?�!'�/�!9�
;�
;�
;�
� � ����!<�!<�!'�.�!8�
:�
:�
:�� � ����!@�!@�!'�*<�!<�
>�
>�
>�� � ����!;�!;�!'�*?�!?�
A�
A�
A�� � ����!;�!;�!'�*Q�!Q�
S�
S�
S�� � ����!;�!;�!'�+�!5�
7�
7�
7�� � ����!;�!;�!'�+�!5�
7�
7�
7�
� � ����!;�!;�!#��V�k�-A�!B�!B�
D�
D�
D�� � ����!@�!@�!#��V�o�-E�!F�!F�
H�
H�
H�� � ����!=�!=�!#��V�n�-D�!E�!E�
G�
G�
G�� � ����!A�!A�!#��V�6H�-H�!I�!I�
K�
K�
K�� � ����!<�!<�!#��V�6K�-K�!L�!L�
N�
N�
N�� � ����!=�!=�!#��V�6]�-]�!^�!^�
`�
`�
`�� � ����!<�!<�!#��V�k�-A�!B�!B�
D�
D�
D�� � ����!<�!<�!#��V�k�-A�!B�!B�
D�
D�
D�_0	D�0	D�0	D�0	D�0	D�0	D�0	D�0	D�0	D�0	D�0	D�0	D����0	D�0	D�0	D�0	D�0	D�0	Ds�'P=R1�1R5�8R5c�l�tjtj��}|�tj|��|�tj|dz��|�tj|dz��|�tj|dz��|�tj|dz��|�tj|dz��t
j||��|�tj	|��|��t
j|dz|dz��t
j|dz|dz��|dz|dzf}|�
tj	|dz��|��|�
tj	|dz��|��|�
tj	|dz��d�|D����|�tj	|dz��tj|����|�tj	|d	z��tj|��d
z��t
j|dz|dz��|�tj	|dztj|��zdz��|dz��|�
tj	|dztj|��zdz��|��t
jtj|��d
z|dz��|�tj	|dz��|dz��t
jdtjtj|����zdztj|��zdz|dz��|�tj	|dz��|dz��|�tj	tj|����|��dS)Nr�r�r�r�r��1\xc3�@K�|]}tj|d��V��dS)r�N)r#�join)r(�rs  rr*z9TestNtpath.test_realpath_symlink_loops.<locals>.<genexpr>As.����A�A�1�6�;�q�#�.�.�A�A�A�A�A�Ar�1\..�1\..\x�\xr��1\..\�a\b�..\r3)
r#r�rr�r�r�r%r�r]r�rar��basename)rMr�r�s   r�test_realpath_symlink_loopsz&TestNtpath.test_realpath_symlink_loops)s�����	� 0�1�1�����	�(�&�1�1�1����	�(�&�3�,�7�7�7����	�(�&�3�,�7�7�7����	�(�&�3�,�7�7�7����	�(�&�3�,�7�7�7����	�(�&�3�,�7�7�7�
�
�6�6�"�"�"����V�_�V�4�4�f�=�=�=�
�
�6�C�<��#��.�.�.�
�
�6�C�<��#��.�.�.��S�L�&�3�,�/�����&�/�&�3�,�7�7��B�B�B����&�/�&�3�,�7�7��B�B�B����&�/�&�6�/�:�:�A�A��A�A�A�	C�	C�	C����V�_�V�g�-=�>�>�#�^�F�3�3�	5�	5�	5����V�_�V�j�-@�A�A�#�^�F�3�3�e�;�	=�	=�	=�
�
�6�C�<��#��.�.�.����V�_�V�i�-?�/5��v�/F�/F�.G�IL�.M�N�N�#�c�\�	+�	+�	+�	
���&�/�&�9�*<�,2�O�F�,C�,C�+D�FI�+J�K�K�"�	$�	$�	$�	�
�6�?�6�*�*�V�3�V�c�\�B�B�B����V�_�V�c�\�:�:�F�S�L�I�I�I�
�
�6�F�O�F�N�6�,B�,B�C�C�C���"�O�F�3�3�4�69�:�;A�C�<�	I�	I�	I����V�_�V�c�\�:�:�F�S�L�I�I�I�	
���V�_�V�_�V�-D�-D�E�E�v�N�N�N�N�Nrc��tjtj��}|�tj|��|�tj|dz��|�tj|dz��|�tj|dz��|�tj|dz��|�tj|dz��t
j||��|�ttj
|d���t
j|dz|dz��t
j|dz|dz��|�ttj
|dzd���|�ttj
|dzd���|�ttj
|dzd���|�tj
|d	zd���tj|����|�ttj
|d
zd���t
j|dz|dz��|�ttj
|dztj
|��zdzd���|�ttj
|dztj
|��zdzd���t
jtj
|��d
z|dz��|�ttj
|dzd���t
jdtj
tj|����zdztj
|��zdz|dz��|�ttj
|dzd���|�ttj
tj
|��d���dS)Nr�r�r�r�r�Tr�r�r�r�r�r�r�r�r3)r#r�rr�r�r�r%r�r�rr�r]r�r�r�s  r�"test_realpath_symlink_loops_strictz-TestNtpath.test_realpath_symlink_loops_strictXs�����	� 0�1�1�����	�(�&�1�1�1����	�(�&�3�,�7�7�7����	�(�&�3�,�7�7�7����	�(�&�3�,�7�7�7����	�(�&�3�,�7�7�7����	�(�&�3�,�7�7�7�
�
�6�6�"�"�"����'�6�?�F�4��H�H�H�
�
�6�C�<��#��.�.�.�
�
�6�C�<��#��.�.�.����'�6�?�F�S�L���N�N�N����'�6�?�F�S�L���N�N�N����'�6�?�F�V�O�D��Q�Q�Q�	
���V�_�V�g�-=�d�K�K�K�#�^�F�3�3�	5�	5�	5����'�6�?�F�Z�4G�PT��U�U�U�
�
�6�C�<��#��.�.�.����'�6�?�F�Y�4F�/5��v�/F�/F�5G�IL�5M�48�	�	:�	:�	:�	
���'�6�?� �9�,�v��v�/F�/F�F��L�!%�	�	'�	'�	'�	�
�6�?�6�*�*�V�3�V�c�\�B�B�B����'�6�?�F�S�L���N�N�N�
�
�6�F�O�F�N�6�,B�,B�C�C�C���"�O�F�3�3�4�69�:�;A�C�<�	I�	I�	I����'�6�?�F�S�L���N�N�N�	
���'�6�?�F�O�F�4K�4K�!%�	�	'�	'�	'�	'�	'rc���tjtj��}|�tj|��|�tj|dz��|�tj|dz��|�tj|dz��|�tj|dz��|�tj|dz��|�tj|dz��t
j||��|�ttj
|t���t
j|dz|dz��t
j|dz|dz��|�ttj
|dzt���|�ttj
|dzt���|�ttj
|dzt���|�tj
|d	z��tj
|����|�tj
|d
z��tj
|��dz��t
j|dz|dz��|�tj
|dztj|��zdz��|dz��|�ttj
|dztj|��zdzt���t
jtj|��d
z|dz��|�ttj
|dzt���t
jdtjtj
|����zdztj|��zdz|dz��|�ttj
|dzt���|�ttj
tj|��t���dS)Nr�r�r�r�r�r�r�r�r�r�r�r�r�r�r3)r#r�rr�r�r�r%r�r�rr�rr]r�r�r�s  r�!test_realpath_symlink_loops_raisez,TestNtpath.test_realpath_symlink_loops_raise�s�����	� 0�1�1�����	�(�&�1�1�1����	�(�&�3�,�7�7�7����	�(�&�3�,�7�7�7����	�(�&�3�,�7�7�7����	�(�&�3�,�7�7�7����	�(�&�3�,�7�7�7����	�(�&�3�,�7�7�7�
�
�6�6�"�"�"����'�6�?�F�=��Q�Q�Q�
�
�6�C�<��#��.�.�.�
�
�6�C�<��#��.�.�.����'�6�?�F�S�L�#0�	�	2�	2�	2����'�6�?�F�S�L�#0�	�	2�	2�	2����'�6�?�F�V�O�#0�	�	2�	2�	2�
	
���V�_�V�g�-=�>�>�#�^�F�3�3�	5�	5�	5����V�_�V�j�-@�A�A�#�^�F�3�3�e�;�	=�	=�	=�	�
�6�C�<��#��.�.�.����V�_�V�i�-?�/5��v�/F�/F�.G�IL�.M�N�N�#�c�\�	+�	+�	+�	
����V�_��Y�����!8�!8�8�3�>� �	�	"�	"�	"�
	�
�6�?�6�*�*�V�3�V�c�\�B�B�B����'�6�?�F�S�L�#0�	�	2�	2�	2�	�
�6�F�O�F�N�6�,B�,B�C�C�C������0�0�1�36�7�8>���	F�	F�	F����'�6�?�F�S�L�#0�	�	2�	2�	2�	
���'�6�?�F�O�F�4K�4K�#0�	�	2�	2�	2�	2�	2rc���tjtj��}|�tj|dz��|�tjd|zdz��|�tj|dz��|�tj|dz��t
|dzd��5}|�d��ddd��n#1swxYwYtj	|dz|dz��t
d|zdzd��5}|�d��ddd��n#1swxYwYtj	d|zdz|dz��|�
tj|dzfi|��|dz��|�
tj|dzfi|��d|zdz��t
tj|dz��d	��5}|�|�
��d��ddd��n#1swxYwYt
tj|dz��d	��5}|�|�
��d��ddd��n#1swxYwY|�
tjd|zdzfi|��d|zdz��|�
tjd|zdzfi|��d|zdz��dS)
N�3z\\?\z3.�3linkz3.linkr��0�1�rb)r#r�rr�r�r�r��writer%r�r]r�rZ�read)rMrOr��fs    r�test_realpath_symlink_prefixz'TestNtpath.test_realpath_symlink_prefix�s�����	� 0�1�1�����	�(�&�3�,�7�7�7����	�(�)�f�*<�t�*C�D�D�D����	�(�&�7�*:�;�;�;����	�(�&�8�*;�<�<�<�
�&�3�,��
%�
%�	��
�G�G�D�M�M�M�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�
�
�6�C�<��'�!1�2�2�2�
�)�f�$�t�+�T�
2�
2�	�a�
�G�G�D�M�M�M�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�
�
�9�v�%��,�f�x�.?�@�@�@����V�_�V�g�-=�H�H��H�H�#�c�\�	+�	+�	+����V�_�V�h�->�I�I�&�I�I�&��/�$�6�	8�	8�	8��&�/�&�7�"2�3�3�T�
:�
:�	-�a����Q�V�V�X�X�t�,�,�,�	-�	-�	-�	-�	-�	-�	-�	-�	-�	-�	-����	-�	-�	-�	-�
�&�/�&�8�"3�4�4�d�
;�
;�	-�q����Q�V�V�X�X�t�,�,�,�	-�	-�	-�	-�	-�	-�	-�	-�	-�	-�	-����	-�	-�	-�	-�	
���V�_�Y��-?�'�-I�T�T�V�T�T�&��/�#�5�	7�	7�	7����V�_�Y��-?�(�-J�U�U�f�U�U�&��/�$�6�	8�	8�	8�	8�	8sH�C#�#C'�*C'�E�E�E�*)H�H#�&H#�)J�J�Jc��tdd��tdd��tdd��tdd��dS)Nzntpath.realpath('NUL')r�z$ntpath.realpath('NUL', strict=False)z#ntpath.realpath('NUL', strict=True)z,ntpath.realpath('NUL', strict=ALLOW_MISSING)rkrls r�test_realpath_nulzTestNtpath.test_realpath_nul�sL���'��4�4�4��5�z�B�B�B��4�j�A�A�A��=�z�J�J�J�J�Jrzneed _getshortpathnamec��tjtj��}tj|��tj|��t
j|��|�tj|��tj	|d��}t
j|��t|��}tj	|d��}tj	|d��}t|d��5}|�d��ddd��n#1swxYwY|�
|tj|����iddidtifD�]-}|jdi|��5tj|��5|�
|tjdi|����ddd��n#1swxYwYtj|�����5|�
|tjdi|����ddd��n#1swxYwYtj|��5|�
|tjdi|����ddd��n#1swxYwYddd��n#1swxYwY��/dS)	N�MyVeryLongDirectoryName�file.txtr�scontentr�TrT)r�)r#r�rr�r�r�r%r�r�r�rr�r�r]r�rrKr��lower)rMr��
test_dir_long�test_dir_short�test_file_long�test_file_shortr�rOs        r�test_realpath_cwdzTestNtpath.test_realpath_cwd�s�����	� 0�1�1����� � � ���� � � �
���������	�(�&�1�1�1���F�,E�F�F�
�
������*�=�9�9����]�J�?�?�� �+�n�j�A�A��
�.�$�
'�
'�	 �1�
�G�G�J����	 �	 �	 �	 �	 �	 �	 �	 �	 �	 �	 ����	 �	 �	 �	 �	
���^�V�_�_�-M�-M�N�N�N��8�T�*�X�}�,E�E�
	?�
	?�F����'�'��'�'�
?�
?��)�-�8�8�?�?��(�(�&���=�=�f�=�=�?�?�?�?�?�?�?�?�?�?�?�?�?�?����?�?�?�?��)�-�*=�*=�*?�*?�@�@�?�?��(�(�&���=�=�f�=�=�?�?�?�?�?�?�?�?�?�?�?�?�?�?����?�?�?�?��)�.�9�9�?�?��(�(�&���=�=�f�=�=�?�?�?�?�?�?�?�?�?�?�?�?�?�?����?�?�?�?�
?�
?�
?�
?�
?�
?�
?�
?�
?�
?�
?����
?�
?�
?�
?��
	?�
	?s��-D�D�D� I2�5&F'�I2�'F+�+I2�.F+�/)I2�&H
�>I2�
H�I2�H�I2�)&I�I2�I�I2�"I�#I2�2I6	�9I6	c��tj��5}|���d|d<d|d<d|d<tdd��tdd	��td
d��tdd
��tdd��tdd��tdd��tdd��tdd��tdd��tdd��tdd	��tdd��tdd��tdd��td d!��td"d#��td$d%��td&d'��ddd��dS#1swxYwYdS)(Nr~rh�baz1z{foo�baz2z{foo}zntpath.expandvars("foo")zntpath.expandvars("$foo bar")zbar barzntpath.expandvars("${foo}bar")�barbarzntpath.expandvars("$[foo]bar")z	$[foo]barzntpath.expandvars("$bar bar")z$bar barzntpath.expandvars("$?bar")z$?barzntpath.expandvars("$foo}bar")zbar}barzntpath.expandvars("${foo")z${foozntpath.expandvars("${{foo}}")zbaz1}zntpath.expandvars("$foo$foo")zntpath.expandvars("$bar$bar")z$bar$barzntpath.expandvars("%foo% bar")zntpath.expandvars("%foo%bar")zntpath.expandvars("%foo%%foo%")z$ntpath.expandvars("%%foo%%foo%foo%")z%foo%foobarzntpath.expandvars("%?bar%")z%?bar%zntpath.expandvars("%foo%%bar")zbar%barz ntpath.expandvars("'%foo%'%bar")z'%foo%'%barzntpath.expandvars("bar'%foo%")z	bar'%foo%)r�EnvironmentVarGuard�clearrG�rM�envs  r�test_expandvarszTestNtpath.test_expandvars	s���
�
*�
,�
,�	D���I�I�K�K�K��C��J� �C��K�!�C��L��-�u�5�5�5��2�I�>�>�>��3�X�>�>�>��3�[�A�A�A��2�J�?�?�?��/��9�9�9��2�I�>�>�>��/��9�9�9��2�G�<�<�<��2�H�=�=�=��2�J�?�?�?��3�Y�?�?�?��2�H�=�=�=��4�h�?�?�?��9�=�I�I�I��0�(�;�;�;��3�Y�?�?�?��7��I�I�I��4�l�C�C�C�/	D�	D�	D�	D�	D�	D�	D�	D�	D�	D�	D�	D����	D�	D�	D�	D�	D�	Ds�EE5�5E9�<E9zneed os_helper.FS_NONASCIIc�H�d�}tj��5}|���tj}||d<d|z||<|dd|z��|d|zd|z��|dd|z��|d	|zd
|z��|dd|z��|d
|zd
|z��|dd|z��|d�|��d|z��|dd|z��|d�|��d
|z��ddd��dS#1swxYwYdS)Nc�,�td|z|��dS)Nzntpath.expandvars(%r)rk)�valuer�s  r�checkz2TestNtpath.test_expandvars_nonascii.<locals>.check%s���*�U�2�H�=�=�=�=�=r�spam�hamz	$spam barz%s barz$%s barz
${spam}barz%sbarz${%s}barzham%sbarz	$spam}barz%s}barz$%s}barz
%spam% barz%{}% barz	ham%s barz	%spam%barz%{}%bar)rr	r
�FS_NONASCIIr)rMrr�nonasciis    r�test_expandvars_nonasciiz#TestNtpath.test_expandvars_nonascii#s���	>�	>�	>�
�
*�
,�
,�	E���I�I�K�K�K� �,�H�"�C��K�!�H�,�C��M��E�+�x�(�2�3�3�3��E�)�h�&�	�H�(<�=�=�=��E�,��(� 2�3�3�3��E�*�x�'��h�)>�?�?�?��E�+�x�(�2�3�3�3��E�)�h�&�	�H�(<�=�=�=��E�,��8� 3�4�4�4��E�*�#�#�H�-�-�{�X�/E�F�F�F��E�+�w��1�2�2�2��E�)�"�"�8�,�,�j�8�.C�D�D�D�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E����	E�	E�	E�	E�	E�	Es�C3D�D�D�cpuc�*�tj}tj��5}|���d|d<d}|�|d|z��d|z��|�|d|z��d|z��|�|d|zdz��d|zd	z��|�|d|z��d	|z��|�|d
|z��d|z��ddd��dS#1swxYwYdS)N�B�Ai��z%A%z%A%A�BAz''z%%�%z$$�$)r#�
expandvarsrr	r
rZ)rMrr�ns    r�test_expandvars_largez TestNtpath.test_expandvars_large7se���&�
�
�
*�
,�
,�	8���I�I�K�K�K��C��H��A����Z�Z��a��0�0�#�a�%�8�8�8����Z�Z��q��1�1�4��6�:�:�:����Z�Z��Q���
�6�6��Q����E�E�E����Z�Z��Q��/�/��Q��7�7�7����Z�Z��Q��/�/��Q��7�7�7�	8�	8�	8�	8�	8�	8�	8�	8�	8�	8�	8�	8����	8�	8�	8�	8�	8�	8s�CD�D�Dc�h�tdd��tj��5}|���tdd��d|d<d|d<d	|d
<tdd��tdd
��|d=tdd��tdd��|���d
|d<d	|d
<tdd��tdd
��tdd��tdd��tdd��tdd��|���d|d<d
|d<d	|d
<tdd��tdd
��|���d
|d<d|d
<tdd��tdd
��ddd��dS#1swxYwYdS)Nzntpath.expanduser("test")�testzntpath.expanduser("~test")z~test�C:\�	HOMEDRIVEz
Users\eric�HOMEPATH�eric�USERNAMEz
C:\Users\testzntpath.expanduser("~")z
C:\Users\ericz
Users\test�USERPROFILEz"ntpath.expanduser("~test\foo\bar")zC:\Users\test\foo\barz"ntpath.expanduser("~test/foo/bar")zC:\Users\test/foo/barzntpath.expanduser("~\foo\bar")zC:\Users\eric\foo\barzntpath.expanduser("~/foo/bar")zC:\Users\eric/foo/barzF:\�HOME�idle)rGrr	r
rs  r�test_expanduserzTestNtpath.test_expanduserDsW���*�F�3�3�3�
�
*�
,�
,�*	@���I�I�K�K�K��/��9�9�9�%�C���+�C�
�O�$�C�
�O��/�1B�C�C�C��+�->�?�?�?��K� ��/��?�?�?��+�]�;�;�;��I�I�K�K�K�!2�C�
��$�C�
�O��/�1B�C�C�C��+�->�?�?�?��9�.�
0�
0�
0��7�,�
.�
.�
.��5�.�
0�
0�
0��3�,�
.�
.�
.�
�I�I�K�K�K� �C��K�!2�C�
��$�C�
�O��/�1B�C�C�C��+�->�?�?�?�
�I�I�K�K�K�!2�C�
��$�C�
�O��/��9�9�9��+�->�?�?�?�U*	@�*	@�*	@�*	@�*	@�*	@�*	@�*	@�*	@�*	@�*	@�*	@����*	@�*	@�*	@�*	@�*	@�*	@s�E6F'�'F+�.F+zabspath requires 'nt' modulec��tdd��tdd��tdd��tdd��td	d��td
d��tdd��td
d��tdd��tdd��tdd��tdd��tdd��tdd��tdd��tdd��tdd��tdd��tdd��tdd ��td!d ��td"d ��td#d ��td$d ��td%d&��td'd(��td)d(��td*d(��td+d(��td,d(��td-d��td.d��td/d��td0d��td1d��tjtj��5}td2|��td3|d4z��td5|d6z��t	j|��\}}td7|d8z��ddd��dS#1swxYwYdS)9Nzntpath.abspath("C:\")r#z-ntpath.abspath("\\?\C:////spam////eggs. . .")z\\?\C:\spam\eggsz-ntpath.abspath("\\.\C:////spam////eggs. . .")z\\.\C:\spam\eggsz#ntpath.abspath("//spam//eggs. . .")z\\spam\eggsz#ntpath.abspath("\\spam\\eggs. . .")zntpath.abspath("C:/spam. . .")zC:\spamzntpath.abspath("C:\spam. . .")zntpath.abspath("C:/nul")z\\.\nulzntpath.abspath("C:\nul")zntpath.abspath("//..")r4zntpath.abspath("//../")z\\..\zntpath.abspath("//../..")zntpath.abspath("//../../")z\\..\..\zntpath.abspath("//../../../")zntpath.abspath("//../../../..")z ntpath.abspath("//../../../../")zntpath.abspath("//server")z\\serverzntpath.abspath("//server/")z	\\server\zntpath.abspath("//server/..")zntpath.abspath("//server/../")z\\server\..\z ntpath.abspath("//server/../..")z!ntpath.abspath("//server/../../")z#ntpath.abspath("//server/../../..")z$ntpath.abspath("//server/../../../")z ntpath.abspath("//server/share")z\\server\sharez!ntpath.abspath("//server/share/")r�z#ntpath.abspath("//server/share/..")z$ntpath.abspath("//server/share/../")z&ntpath.abspath("//server/share/../..")z'ntpath.abspath("//server/share/../../")zntpath.abspath("C:\nul. . .")zntpath.abspath("//... . .")zntpath.abspath("//.. . . .")zntpath.abspath("//../... . .")zntpath.abspath("//../.. . . .")zntpath.abspath("")zntpath.abspath(" ")z\ zntpath.abspath("?")z\?zntpath.abspath("/abc/")z\abc)rGr�temp_cwdr�r#r{)rM�cwd_dir�drive�_s    r�test_abspathzTestNtpath.test_abspathus=���'��0�0�0��A�CZ�[�[�[��A�CZ�[�[�[��4�:J�K�K�K��8�:J�K�K�K��/�*�=�=�=��0�*�=�=�=��)�L�9�9�9��*�L�9�9�9��'�6�:�:�:��(�:�>�>�>��*�:�>�>�>��+�>�B�B�B��.�>�B�B�B��0�>�B�B�B��1�>�B�B�B��+�|�D�D�D��,�~�F�F�F��.�~�F�F�F��/�7I�J�J�J��1�7I�J�J�J��2�7I�J�J�J��4�7I�J�J�J��5�7I�J�J�J��1�:M�N�N�N��2�:O�P�P�P��4�:O�P�P�P��5�:O�P�P�P��7�:O�P�P�P��8�:O�P�P�P��/��>�>�>��,�v�6�6�6��-�v�6�6�6��/�*�=�=�=��0�*�=�=�=�
�
�	� 0�
1�
1�	?�W��'��1�1�1��(�'�E�/�:�:�:��(�'�E�/�:�:�:��(��1�1�H�E�1��,�e�g�o�>�>�>�	?�	?�	?�	?�	?�	?�	?�	?�	?�	?�	?�	?����	?�	?�	?�	?�	?�	?s�A!J=�=K�Kc�2�tdd��tdd��tdd��tdd��tjtj��5}t	j|��}tdd	|zd
z��tdd	|zdz��ddd��n#1swxYwYtd
d��tdd��tdd��tdd��tdd��tdd��tdd��tdd��tdd��tdd��td d��td!d��td"d��td#d��dS)$Nzntpath.relpath("a")r�z#ntpath.relpath(ntpath.abspath("a"))zntpath.relpath("a/b")r�zntpath.relpath("../a/b")z..\a\bzntpath.relpath("a", "../b")r�r�zntpath.relpath("a/b", "../c")z\a\bzntpath.relpath("a", "b/c")z..\..\az*ntpath.relpath("c:/foo/bar/bat", "c:/x/y")z..\..\foo\bar\batz@ntpath.relpath("//conky/mountpoint/a", "//conky/mountpoint/b/c")zntpath.relpath("a", "a")r�z(ntpath.relpath("/foo/bar/bat", "/x/y/z")z..\..\..\foo\bar\batz*ntpath.relpath("/foo/bar/bat", "/foo/bar")�batz#ntpath.relpath("/foo/bar/bat", "/")zfoo\bar\batz#ntpath.relpath("/", "/foo/bar/bat")r�z$ntpath.relpath("/foo/bar/bat", "/x")z..\foo\bar\batz$ntpath.relpath("/x", "/foo/bar/bat")z
..\..\..\xzntpath.relpath("/", "/")zntpath.relpath("/a", "/a")zntpath.relpath("/a/b", "/a/b")z"ntpath.relpath("c:/foo", "C:/FOO"))rGrr-r�r#r�)rMr.�
currentdirs   r�test_relpathzTestNtpath.test_relpath�s����$�c�*�*�*��4�c�:�:�:��&��/�/�/��)�:�6�6�6�
�
�	� 0�
1�
1�	P�W����1�1�J��0�&��2C�E�2I�J�J�J��2�F�:�4E�h�4N�O�O�O�	P�	P�	P�	P�	P�	P�	P�	P�	P�	P�	P����	P�	P�	P�	P�	�+�[�9�9�9��;�=T�U�U�U��Q�S^�_�_�_��)�3�/�/�/��9�;V�W�W�W��;�U�C�C�C��4�o�F�F�F��4�l�C�C�C��5�7J�K�K�K��5��G�G�G��)�3�/�/�/��+�S�1�1�1��/��5�5�5��3�S�9�9�9�9�9s�AB,�,B0�3B0c���d�}�fd�}��ttjg��|tddg��|tddg��|tddg��|tddg��|dgd��|ddgd��|ddgd��|ddgd��|dd	gd��|d
dgd��|dd
gd��|dd
gd��|ddgd��|ddgd��|ddgd��|ddgd��|ddgd��|ddgd��|ddgd��|tddg��|dgd��|ddgd��|ddgd��|ddgd��|ddgd��|ddgd��|gd�d��|gd �d��|d!d"gd#��|dgd��|dd$gd��|tdd%g����ttjd&dg����ttjd&d'g����ttjd(dg����ttjdd)g����ttjdd*g����ttjdd)g��dS)+Nc�T�td|z�dd��|��dS)Nzntpath.commonpath(%r)r4r3)rGr9)�pathsr�s  rrz)TestNtpath.test_commonpath.<locals>.check�s9���+�e�3�<�<�V�T�J�J��
�
�
�
�
rc�����|tj|����|tjd�|D����dS)Nc�6�g|]}tj|����SrT)r%r<r's  r�
<listcomp>zCTestNtpath.test_commonpath.<locals>.check_error.<locals>.<listcomp>�s ��=�=�=�!�r�{�1�~�~�=�=�=r)r�r#�
commonpath)�excr8rMs  �r�check_errorz/TestNtpath.test_commonpath.<locals>.check_error�sX������c�6�#4�e�<�<�<����c�6�#4�=�=�u�=�=�=�
?�
?�
?�
?�
?rzC:\Program Filesz
Program FileszC:Program Filesz\Program FileszC:\Program Files\zC:\\Program FileszC:\Program Files\\zC:\.\Program FileszC:\Program Files\.r#zC:\binzC:\Program Files\BarzC:\Program Files\FoozC:\ProjectszC:/Program Files/Barzc:/program files/barzc:\program fileszD:\Program Filesr�alotrj�and\jam�and\spam�andzand\\jamz
and\spam\\z	and\.\jamz
.\and\spam)r@rAr?)r@rArBz	C:and\jamz
C:and\spamzC:andz	spam\alotz
\spam\alotsC:\Program FileszProgram Files\Foos
Program FilessC:\Program Files\FoosProgram Files\Foo)r��
ValueErrorr#r<�	TypeError)rMrr>s`  r�test_commonpathzTestNtpath.test_commonpath�s����	�	�	�	?�	?�	?�	?�	?�
	
���*�f�&7��<�<�<���J�!4�o� F�G�G�G���J�!4�6G� H�I�I�I���J�!2�O� D�E�E�E���J��2E� F�G�G�G�
��"�#�%8�9�9�9�
��"�$7�8�:M�N�N�N�
��$�&9�:�!�	#�	#�	#�
��$�&;�<�!�	#�	#�	#�
��$�&=�>�!�	#�	#�	#�
��%�'=�>�!�	#�	#�	#�
��v�y�!�6�*�*�*�
��"�I�.��7�7�7�
��"�$<�=�!�	#�	#�	#�
��'�)A�B�!�	#�	#�	#�
��"�N�3�V�<�<�<�
��$�n�5�v�>�>�>�
��'�)?�@�!�	#�	#�	#�
��'�)?�@�!�	#�	#�	#�
��%�'?�@�!�	#�	#�	#�	��J�!4�6I� J�K�K�K�
��v�h�����
��v�v���'�'�'�
��v�v���#�#�#�
��z�;�'��/�/�/�
��|�_�-�u�5�5�5�
��}�n�-�u�5�5�5�
��/�/�/��4�4�4�
��.�.�.��6�6�6�
��|�]�+�W�5�5�5�
��r�d�B����
��r�<� �"�%�%�%���J��^� 4�5�5�5����)�V�%6�/�1I�J�	L�	L�	L����)�V�%6�/�1E�F�	H�	H�	H����)�V�%6�+�-E�F�	H�	H�	H����)�V�%6�.�0I�J�	L�	L�	L����)�V�%6�.�0E�F�	H�	H�	H����)�V�%6�*�,E�F�	H�	H�	H�	H�	Hrz&Emscripten cannot fstat unnamed files.c	�~�t��5}t��5}|�tj|���|�������|�tj|���|�������tjdkrG|�t��5tjdd��ddd��n#1swxYwYddd��n#1swxYwYddd��dS#1swxYwYdS)N�win32���)
r	�
assertTruer#�sameopenfile�fileno�assertFalse�sys�platformr�r)rM�tf1�tf2s   r�test_sameopenfilezTestNtpath.test_sameopenfile�s���
�_�_�
	0��]�_�_�
	0���O�O�F�/��
�
���c�j�j�l�l�K�K�L�L�L����V�0������s�z�z�|�|�L�L�M�M�M��|�w�&�&��&�&�w�/�/�0�0��'��B�/�/�/�0�0�0�0�0�0�0�0�0�0�0����0�0�0�0�
	0�
	0�
	0�
	0�
	0�
	0�
	0�
	0�
	0�
	0�
	0����
	0�
	0�
	0�
	0�
	0�
	0�
	0�
	0�
	0�
	0�
	0�
	0�
	0�
	0�
	0�
	0����
	0�
	0�
	0�
	0�
	0�
	0sY�D2�CD�!D�7D�D�D�
D�D�D2�D	�D2�!D	�"D2�2D6�9D6c�B�|�tjd����|�tjd����|�tjd����|�tjd����|�tjd����|�tjd����|�tjd����|�tjd����|�tjd	����|�tjd
����|�tjd����|�tjd����tj��5}|�tj|����ddd��n#1swxYwYtjd
k�rgtj	d��}tj
|��\}}tj|��5|�tj|�������|�tj|�
������ddd��n#1swxYwY|�tjd����|�tjd����|�tjd����|�tjd����dSdS)Nrr#r�zC:/z\\.\c:\z\\.\C:\sc:\sC:\sc:/sC:/s\\.\c:\s\\.\C:\rG�
SystemRootz\\localhost\c$z\\localhost\c$\s\\localhost\c$s\\localhost\c$\)rIr#�ismountr�temp_dirrLrMrNr%�getenvr{r�r��upper)rMr��test_cwdr/rs     r�test_ismountzTestNtpath.test_ismountsL�������v�.�.�/�/�/������v�.�.�/�/�/������u�-�-�.�.�.������u�-�-�.�.�.������}�5�5�6�6�6������}�5�5�6�6�6������w�/�/�0�0�0������w�/�/�0�0�0������v�.�.�/�/�/������v�.�.�/�/�/������~�6�6�7�7�7������~�6�6�7�7�7�
�
�
!�
!�	0�Q����V�^�A�.�.�/�/�/�	0�	0�	0�	0�	0�	0�	0�	0�	0�	0�	0����	0�	0�	0�	0��<�7�"�"��y��.�.�H� �+�H�5�5�K�E�4��%�h�/�/�
@�
@�� � ������
�
�!>�!>�?�?�?�� � ������
�
�!>�!>�?�?�?�
@�
@�
@�
@�
@�
@�
@�
@�
@�
@�
@����
@�
@�
@�
@�
�O�O�F�N�+>�?�?�@�@�@��O�O�F�N�+@�A�A�B�B�B��O�O�F�N�+?�@�@�A�A�A��O�O�F�N�+A�B�B�C�C�C�C�C�!#�"s%�((H�H �#H �7A3K6�6K:�=K:c�|�	|�|���|�����dSr")rZr�)rM�s1�s2s   r�
assertEqualCIzTestNtpath.assertEqualCI0s1��J���������R�X�X�Z�Z�0�0�0�0�0rzOS helpers require 'nt' modulec�*�tjtj��}|t	j|��fD]`}tj|��}tj|��d}tj|��d}|�	||���atj
tj��\}}|�|d��|�|d��tj
tj�
����\}}	|�||��|�|	d��tjtjfD]�}tj|��}
|�|
t"��|�t%|
��d��tj|�
����}|�|t&��|�t%|��d����dS)Nr)�nt�_getfinalpathnamerM�
executabler%r<�_getvolumepathnamer#r{r]�
_getdiskusage�exec_prefix�
assertGreaterr>rZ�prefix�assertIsInstancer-�lenr,)rMrar�volume_path�
path_drive�volume_path_drive�cap�free�b_cap�b_free�
final_path�b_final_paths            r�test_nt_helperszTestNtpath.test_nt_helpers4s���
�)�#�.�9�9�
����J� 7� 7�7�	>�	>�D��/��5�5�K��*�4�0�0��3�J� &� 1�+� >� >�q� A�����z�+<�=�=�=�=��$�S�_�5�5�	��T����3��"�"�"����4��#�#�#��(���)?�)?�)A�)A�B�B�
��v������$�$�$����6�1�%�%�%��Z���0�	5�	5�D��-�d�3�3�J��!�!�*�c�2�2�2����s�:����2�2�2��/����
�
�>�>�L��!�!�,��6�6�6����s�<�0�0�!�4�4�4�4�	5�	5rN)5rbrcrdrmr|r�r�r�r�r�r�r�r�r�r�r�r�skip_unless_symlink�unittest�
skipUnless�HAVE_GETFINALPATHNAMErVrr�r�r�r�r�r�r�r�r�r�r��HAVE_GETSHORTPATHNAMErr
rrr�requires_resourcer r+r_r1r5rE�skipIfrrQrYr]rrrTrrrfrfos�������
D�
D�
D�4:�4:�4:�l
S�
S�
S�/�/�/�"�"�"�?R�?R�?R�B(2�(2�(2�TD�D�D�Q�Q�Q����
6�
6�
6�
6�
6�
6�6�6�6��"��X��.�0H�I�I��]�2��$�'�(�M�)B�C�C�X�X�D�C�J�I�#�"�X�<�"��X��.�0H�I�I�Y�Y�J�I�#�"�Y��X��.�0H�I�I�%[�%[�J�I�%[�N�X��.�0H�I�I��]�2��$�'�(�M�)B�C�C�O�O�D�C�J�I�O�"�"��X��.�0H�I�I��]�2��$�'�(�M�)B�C�C�N�N�D�C�J�I�#�"�N��"��X��.�0H�I�I�5D�5D�J�I�#�"�5D�n�"��X��.�0H�I�I�+O�+O�J�I�#�"�+O�Z�"��X��.�0H�I�I�('�('�J�I�#�"�('�T�"��X��.�0H�I�I�22�22�J�I�#�"�22�h�"��X��.�0H�I�I��]�2��$�'�(�M�)B�C�C�8�8�D�C�J�I�#�"�8�@�X��.�0H�I�I�K�K�J�I�K��X��.�0H�I�I��X��.�0H�I�I�!?�!?�J�I�J�I�!?�FD�D�D�4�X���.�0L�M�M�E�E�N�M�E�&�W��u�%�%�
8�
8�&�%�
8�-@�-@�-@�b�X���;�<�<�)?�)?�=�<�)?�V:�:�:�0CH�CH�CH�J�X�_�]�$L�M�M�0�0�N�M�0�"D�"D�"D�H1�1�1��X���=�>�>�5�5�?�>�5�5�5rrfc��eZdZeZdgZdS)�NtCommonTestr�N)rbrcrdr#�
pathmodule�
attributesrTrrr{r{Ss�������J���J�J�Jrr{c��eZdZeZd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZdS)�
PathLikeTestsc�6�tj|_ttj��|_|�tj|j��t|jdd��5}|�d��ddd��dS#1swxYwYdS)N�xbrstest_ntpath.PathLikeTests)	rr��	file_namer�	file_pathr�r�r�r�)rM�files  r�setUpzPathLikeTests.setUp\s���"�)���!�)�"2�3�3������	�(�$�.�9�9�9�
�$�.�$��
*�
*�	5�d��J�J�3�4�4�4�	5�	5�	5�	5�	5�	5�	5�	5�	5�	5�	5�	5����	5�	5�	5�	5�	5�	5s�+B�B�Bc�j�|�||j��||j����dSr")r]r�r�)rMrQs  r�_check_functionzPathLikeTests._check_functioncs6�����T�T�$�.�1�1�4�4���3G�3G�H�H�H�H�Hrc��|�|jj��tjdkrR|�t
jd��d��|�t
jd��d��dSdS)NrGuΩΩuωΩzabcdef)r�rr$rMrNrZr#rls r�test_path_normcasez PathLikeTests.test_path_normcasefsv�����T�Y�/�0�0�0��<�7�"�"����V�_�^�<�<�g�F�F�F����V�_�\�:�:�L�I�I�I�I�I�#�"rc�D�|�|jj��dSr")r�r�isabsrls r�test_path_isabszPathLikeTests.test_path_isabsl� �����T�Y�_�-�-�-�-�-rc��|�|j�dtd��d��|j�ddd����dS)Nr��br�)rZrr�rrls r�test_path_joinzPathLikeTests.test_path_joinosS����������X�c�]�]�C�@�@������S�#�6�6�	8�	8�	8�	8�	8rc�D�|�|jj��dSr")r�r�splitrls r�test_path_splitzPathLikeTests.test_path_splitsr�rc�D�|�|jj��dSr")r�r�splitextrls r�test_path_splitextz PathLikeTests.test_path_splitextv�!�����T�Y�/�0�0�0�0�0rc�D�|�|jj��dSr")r�rr{rls r�test_path_splitdrivez"PathLikeTests.test_path_splitdrivey�!�����T�Y�1�2�2�2�2�2rc�D�|�|jj��dSr")r�rr�rls r�test_path_basenamez PathLikeTests.test_path_basename|r�rc�D�|�|jj��dSr")r�rr�rls r�test_path_dirnamezPathLikeTests.test_path_dirname�!�����T�Y�.�/�/�/�/�/rc�D�|�|jj��dSr")r�r�islinkrls r�test_path_islinkzPathLikeTests.test_path_islink�s!�����T�Y�-�.�.�.�.�.rc�D�|�|jj��dSr")r�r�lexistsrls r�test_path_lexistszPathLikeTests.test_path_lexists�r�rc�D�|�|jj��dSr")r�rrTrls r�test_path_ismountzPathLikeTests.test_path_ismount�r�rc�D�|�|jj��dSr")r�r�
expanduserrls r�test_path_expanduserz"PathLikeTests.test_path_expanduser�r�rc�D�|�|jj��dSr")r�rrrls r�test_path_expandvarsz"PathLikeTests.test_path_expandvars�r�rc�D�|�|jj��dSr")r�rr�rls r�test_path_normpathz PathLikeTests.test_path_normpath�r�rc�D�|�|jj��dSr")r�rr�rls r�test_path_abspathzPathLikeTests.test_path_abspath�r�rc�D�|�|jj��dSr")r�rr�rls r�test_path_realpathz PathLikeTests.test_path_realpath�r�rc�D�|�|jj��dSr")r�rr�rls r�test_path_relpathzPathLikeTests.test_path_relpath�r�rc��|j�|j|jg��}|�||j��dSr")rr<r�r�r])rM�common_paths  r�test_path_commonpathz"PathLikeTests.test_path_commonpath�s>���i�*�*�D�N�D�N�+K�L�L�����[�$�.�9�9�9�9�9rc�D�|�|jj��dSr")r�r�isdirrls r�test_path_isdirzPathLikeTests.test_path_isdir�r�rN)rbrcrdr#rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rTrrrrXsZ�������D�5�5�5�I�I�I�J�J�J�.�.�.�8�8�8�.�.�.�1�1�1�3�3�3�1�1�1�0�0�0�/�/�/�0�0�0�0�0�0�3�3�3�3�3�3�1�1�1�0�0�0�1�1�1�0�0�0�:�:�:�.�.�.�.�.rr�__main__)%r#r%r��
subprocessrMrtr?rr"r�test.supportrr�test.support.os_helperrr�tempfiler	r_�ImportErrorr`rv�AttributeErrorr
rwrr1rGrV�TestCaserXrf�
CommonTestr{rrb�mainrTrr�<module>r�s���
�
�
�
�	�	�	�	�
�
�
�
�����
�
�
�
��������� � � � � � �������1�1�1�1�1�1�1�1�+�+�+�+�+�+�!�!�!�!�!�!�"�"�"�"�"�"��
�I�I�I�I������
�B�B�B�����
!�
���!�����"�"�"�!����"����
#��M�M�M�!��
#�
#�
#�
#��	�"�"�"�!����"���� ���<�<�<�0"�"�"�*3�3�3�3�3�X�&�3�3�3�a5�a5�a5�a5�a5��a5�a5�a5�H�����#�.��0A����
J.�J.�J.�J.�J.�N�J.�J.�J.�Z�z����H�M�O�O�O�O�O��s6�A	�	A�A�A!�!A+�*A+�/A9�9B�B