python (3.12.0)

(root)/
lib/
python3.12/
test/
__pycache__/
test_getpath.cpython-312.opt-1.pyc

ΑepddlZddlZddlZddlZddlZddlmZ	ejejjjjdzjZGddej Zed>iddd	dd
dddddd
dddddddddddddddddddddddddddddddddZed>id dd!dd"dd#dd$dd%dd&dd'dd(dd)dd*dd+dd,dd-dd.dd/dd0dd1dd2d3d4d3ZGd5d6eZGd7d8ZGd9d:eZd?d;Zd?d<Zd=Zy#e
$rddlmZeZYwxYw)@N)verbosezModules/getpath.py)get_getpath_codeobjectceZdZfdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdZdZdZxZS)MockGetPathTestsc2t||i|d|_yN)super__init__maxDiff)selfakw	__class__s   E/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/test/test_getpath.pyr
zMockGetPathTests.__init__s
!"r"c	tdd}|jd|jd|jdt	dddddgd}t||}|j
||y	)
z,Test a 'standard' install layout on Windows.C:\Python\python.exeargv0real_executableC:\Python\Lib\os.pyC:\Python\DLLs	C:\PythonC:\Python\python98.zipr
C:\Python\Libr
executablebase_executableprefixexec_prefixmodule_search_paths_setmodule_search_pathsNMockNTNamespaceadd_known_xfileadd_known_file
add_known_dirdictgetpathassertEqualrnsexpectedactuals    rtest_normal_win32z"MockGetPathTests.test_normal_win32s}
)3
	23
01
*+.3$$%!

X&6*rctdd}|jd|jd|jddgtdddddddgd	}t	||}|j||y
)z(Test an in-build-tree layout on Windows.#C:\CPython\PCbuild\amd64\python.exerC:\CPython\Lib\os.py'C:\CPython\PCbuild\amd64\pybuilddir.txt
C:\CPythonrz%C:\CPython\PCbuild\amd64\python98.zipzC:\CPython\PCbuild\amd64C:\CPython\Librr r!r"build_prefix_is_python_buildr#r$Nr&r'r(r*r+r,r-s    rtest_buildtree_win32z%MockGetPathTests.test_buildtree_win320s
8B
	AB
12
DrdK=B %&$%!

X&6*rc4tddd}|jd|jd|jd|jd|jddgt	ddddddd	gd
}t||}|j
||y)
zTest a venv layout on Windows.

        This layout is discovered by the presence of %__PYVENV_LAUNCHER__%,
        specifying the original launcher executable. site.py is responsible
        for updating prefix and exec_prefix.
        rzC:\venv\Scripts\python.exe)rENV___PYVENV_LAUNCHER__rrrzC:\venv\pyvenv.cfgzhome = C:\Pythonrrrrr!r"r base_prefixbase_exec_prefixr#r$Nr%r-s    rtest_venv_win32z MockGetPathTests.test_venv_win32Js)$A3

	23
89
01
*+
/2
	4$3$)$%!
X&6*rcd}t|d|dd|ddi}tdd|}|jd|jd	|j	d
tdgd
}t
||}|j||d|dd<d|dd<d|dd<tdgd
}t
||}|j||y)zTest registry lookup on Windows.

        On Windows there are registry entries that are intended for other
        applications to register search paths.
        z1HKLM\Software\Python\PythonCore\9.8-XY\PythonPathNz\Path1	path1-dirz
\Path1\Subdirznot-subdirsr)rrwinregrrr)rrFrrr)r#r$rconfiguse_environmentr#r$r)
MockWinregr&r'r(r)r*r+r,)rhkeyrGr.r/r0s      rtest_registry_win32z$MockGetPathTests.test_registry_win32osD$fGkfO$m

)3

	23
01
*+$%!

X&6**+8&'238./.28*+$%!
X&6*rc	,tdd}|jd|jd|jdd|jd|j	dtdddddgd	}t
||}|j||y
)z8Test a 'standard' install layout via symlink on Windows.C:\LinkedFrom\python.exerrrrrrrrN)r&r'add_known_linkr(r)r*r+r,r-s    rtest_symlink_normal_win32z*MockGetPathTests.test_symlink_normal_win32s
-3
	67
23
57NO
01
*+27$$%!

X&6*rc4tdd}|jd|jd|jdd|jd|jddgt	dddddddgd	
}t||}|j
||y)z4Test an in-build-tree layout via symlink on Windows.rNr3rr4r5r6r7rr8r:N)r&r'rOr(r*r+r,r-s    rtest_symlink_buildtree_win32z-MockGetPathTests.test_symlink_buildtree_win32s
-B
	67
AB
57]^
12
DrdK27 %&$%!

X&6*rctddd}|jd|jd|jddgtdddddddgd	
}t	||}|j||y)zETest an out-of-build-tree layout on Windows with PYTHONHOME override.zC:\Out\python.exer7)rrENV_PYTHONHOMEr4zC:\Out\pybuilddir.txtr6zC:\r)zC:\Out\python98.zipzC:\Outr9r:Nr=r-s    rtest_buildtree_pythonhome_win32z0MockGetPathTests.test_buildtree_pythonhome_win32s
&0(

	/0
12
2RD9+0 % $%!
"X&6*rc	tdd}|jd|jdtdddddgd}t	||}|j||y)	z0Test a layout on Windows with no DLLs directory.rrrrr)rrrrNr=r-s    rtest_no_dlls_win32z#MockGetPathTests.test_no_dlls_win32sn
)3
	23
01.3$$%!

X&6*rc	tddd}|jd|jd|jdt	dddddgd	
}t||}|j
||y)z(Test a 'standard' install layout on *nix/usrpythonz/usr/bin)PREFIXrENV_PATH/usr/bin/python/usr/lib/python9.8/os.py/usr/lib/python9.8/lib-dynloadrz/usr/lib/python98.zipz/usr/lib/python9.8r_rNMockPosixNamespacer'r(r)r*r+r,r-s    rtest_normal_posixz"MockGetPathTests.test_normal_posixs


	,-
45
9:(-$%!

X&6*rc2tdd}|jd|jd|jddg|jd|jdt	ddddd	d
d
gd}t||}|j
||y
)Test an in-build-tree layout on POSIX.

        This layout is discovered from the presence of pybuilddir.txt, which
        contains the relative path from the executable's directory to the
        platstdlib path.
        /home/cpython/python
/usr/localrr[/usr/local/bin/python/home/cpython/pybuilddir.txtbuild/lib.linux-x86_64-9.8/home/cpython/Lib/os.py/home/cpython/lib-dynload
/home/cpythonr/usr/local/lib/python98.zip/home/cpython/Libz(/home/cpython/build/lib.linux-x86_64-9.8rr!r"r r;r<r#r$Nrar-s    rtest_buildpath_posixz%MockGetPathTests.test_buildpath_posix%s )
	12
23
8;W:XY
34
45-$2($%!

X&6*rc4tddd}|jd|jd|jd|jd|jd	d
gt	dddddddgd
}t||}|j
||y)Test a venv layout on *nix.rZrY/venv/bin:/usr/binrr[r\r]/venv/bin/pythonr^r_/venv/pyvenv.cfghome = /usr/binrr`rANrar-s    rtest_venv_posixz MockGetPathTests.test_venv_posixFs
)

	,-
-.
45
9:
,/
	)-#$%!

X&6*rcXtddd}|jd|jd|jdd|jd|j	d|jd	d
gtdddddddgd
}t
||}|j||y)rurZrYrvrwz/usr/bin/python3rxr^r_ryrzrr`rANrbr'rOr(r)r*r+r,r-s    rtest_venv_changed_name_posixz-MockGetPathTests.test_venv_changed_name_posixes
)

	-.
-.
,.@A
45
9:
,/
	).#$%!

X&6*rcXtddd}|jd|jd|jdd|jd|j	d|jdd	gtdd
d
dd
d
dgd
}t
||}|j||y)zCTest a venv created from non-installed python has correct zip path.rxrYrvrwz!/path/to/non-installed/bin/pythonz*/path/to/non-installed/lib/python9.8/os.py0/path/to/non-installed/lib/python9.8/lib-dynloadryzhome = /path/to/non-installedz/path/to/non-installedr)z'/path/to/non-installed/lib/python98.zipz$/path/to/non-installed/lib/python9.8rrANr}r-s    r&test_venv_non_installed_zip_path_posixz7MockGetPathTests.test_venv_non_installed_zip_path_posixs
$)

	>?
-.
,=	?
FG
KL
,,/
	)+0?05$%!

X&6*rc4tddd}|jd|jd|jd|jd|jd	d
gt	dddddddgd
}t||}|j
||y)zETest a venv --copies layout on *nix that lacks a distributed 'python'rZrYrvrwz/usr/bin/python9rxr^r_ryrzrr`rANrar-s    r!test_venv_changed_name_copy_posixz2MockGetPathTests.test_venv_changed_name_copy_posixs
)

	-.
-.
45
9:
,/
	).#$%!

X&6*rc	,tdd}|jd|jd|jdd|jd|j	dtdddddgd	}t
||}|j||y
)z4Test a 'standard' install layout via symlink on *nixrY/linkfrom/python)r[rr]r^r_rr`rNr}r-s    rtest_symlink_normal_posixz*MockGetPathTests.test_symlink_normal_posixs
$
	-.
,-
,.?@
45
9:).$%!

X&6*rcxtdd}|jd|jd|jdd|jd|jddg|jd|j	d	tddddd
ddgd
}t
||}|j||y)rerrgrhrfrirjrkrlrmrnrrorrNr}r-s    rtest_symlink_buildpath_posixz-MockGetPathTests.test_symlink_buildpath_posixs %
	-.
12
,.DE
23
8;W:XY
34
45)$.($%!

X&6*rc	tddd}|jd|jd|jdt	dddddgd	
}t||}|j
||y)z.Test an install with custom platlibdir on *nixrYrlib64)r[r
PLATLIBDIRr]z/usr/lib64/python9.8/os.py /usr/lib64/python9.8/lib-dynloadr)z/usr/lib64/python98.zipz/usr/lib64/python9.8rrNrar-s    rtest_custom_platlibdir_posixz-MockGetPathTests.test_custom_platlibdir_posixs
$

	,-
67
;<).$%!

X&6*rctdddddddd}|jd|jd|jd|jd	t	dddddddgd
}t||}|j
||y)
z Test framework layout on macOS

        This layout is primarily detected using a compile-time option
        (WITH_NEXT_FRAMEWORK).
        darwin\/Library/Frameworks/Python.framework/Versions/9.8/Resources/Python.app/Contents/MacOS/Pythonr1/Library/Frameworks/Python.framework/Versions/9.8?/Library/Frameworks/Python.framework/Versions/9.8/bin/python9.88/Library/Frameworks/Python.framework/Versions/9.8/Pythonos_namerWITH_NEXT_FRAMEWORKr[EXEC_PREFIXr@rlibraryK/Library/Frameworks/Python.framework/Versions/9.8/lib/python9.8/lib-dynloadE/Library/Frameworks/Python.framework/Versions/9.8/lib/python9.8/os.pyzB/Library/Frameworks/Python.framework/Versions/9.8/lib/python98.zipz?/Library/Frameworks/Python.framework/Versions/9.8/lib/python9.8rrAN)rbr'r)r(r*r+r,r-s    rtest_framework_macosz%MockGetPathTests.test_framework_macoss p !FK$ezN	
	yz
\]
fg
ab
XFK]KP$%!

X&6*rc"tddddddddddddd
}|jd|jd|jd	|jd
tdddddddgd}t	||}|j||y)
z Test framework layout on macOS with alternate framework name

        ``--with-framework-name=DebugPython``

        This layout is primarily detected using a compile-time option
        (WITH_NEXT_FRAMEWORK).
        f/Library/Frameworks/DebugPython.framework/Versions/9.8/Resources/Python.app/Contents/MacOS/DebugPythonrr6/Library/Frameworks/DebugPython.framework/Versions/9.8D/Library/Frameworks/DebugPython.framework/Versions/9.8/bin/python9.8B/Library/Frameworks/DebugPython.framework/Versions/9.8/DebugPythonN)
rrrr[rr@rr
PYTHONPATHrTENV_PYTHONEXECUTABLEexecutable_dir
py_setpathP/Library/Frameworks/DebugPython.framework/Versions/9.8/lib/python9.8/lib-dynloadJ/Library/Frameworks/DebugPython.framework/Versions/9.8/lib/python9.8/os.pyzG/Library/Frameworks/DebugPython.framework/Versions/9.8/lib/python98.zipzD/Library/Frameworks/DebugPython.framework/Versions/9.8/lib/python9.8rrA)rbr'r)r*r+r,r-s    rtest_alt_framework_macosz)MockGetPathTests.test_alt_framework_macosDs z !KP$jEX!%
	D	E
ab
kl
gh]KPbPU$%!

X&6*rcd}tddddd|ddd}|j||j|d	|j|d
|j|d|j|d|jd|jd|jd
|jd|j|ddgt	|dddddddgd}t||}|j
||y)z<Test a venv layout on macOS using a framework build
        /tmp/workdir/venvrrrr/bin/pythonrr/bin/lib/lib/python9.8rrr/pyvenv.cfgz<home = /Library/Frameworks/Python.framework/Versions/9.8/binrrANrbr)r'r(r*r+r,r	venv_pathr.r/r0s     rtest_venv_framework_macosz*MockGetPathTests.test_venv_framework_macosss<(	
p !FK'0k$=zN	
	#
I;d+,
I;d+,
I;n56
i[45
yz
\]
fg
bc
YK{3J6
	#K0FK]KP$%!

X&6*rcd}tddddd|ddd}|j||j|d	|j|d
|j|d|j|d|jd|jd|jd
|jd|j|ddgt	|dddddddgd}t||}|j
||y)zkTest a venv layout on macOS using a framework build

        ``--with-framework-name=DebugPython``
        rrrrrrrrrrrrrrrzAhome = /Library/Frameworks/DebugPython.framework/Versions/9.8/binrrANrrs     rtest_venv_alt_framework_macosz.MockGetPathTests.test_venv_alt_framework_macossE
(	
z !KP'0k$=EX	
	#
I;d+,
I;d+,
I;n56
i[45
D	E
ab
kl
gh
YK{3O6
	#K0KPbPU$%!

X&6*rc8tddddd}|jd|jd|jd|jd|jdd	gt	ddddddd
gd}t||}|j
||y
)zTest a venv layout on macOS.

        This layout is discovered when 'executable' and 'real_executable' match,
        but $__PYVENV_LAUNCHER__ has been set to the original process.
        rr]rYz/framework/Python9.8/python)rrr[r@rr^r_z/framework/Python9.8/pyvenv.cfgrzrr`rANrar-s    rtest_venv_macosz MockGetPathTests.test_venv_macoss #$A-
	,-
89
45
9:
;>
	4-#$%!

X&6*rc	2tddddd}|jd|jd|jdd|jd|j	d	tddddd
gd}t
||}|j||y
)z5Test a 'standard' install layout via symlink on macOSrrYrZ/linkfrom:/usr/binr)rr[rr\rr]r^r_rr`rNr}r-s    rtest_symlink_normal_macosz*MockGetPathTests.test_symlink_normal_macoss
).

	-.
,-
,.?@
45
9:).$%!

X&6*rc~tddddd}|jd|jd|jdd|jd|jd	d
g|jd|j	dtddddd
ddgd}t
||}|j||y)zTest an in-build-tree layout via symlink on macOS.

        This layout is discovered from the presence of pybuilddir.txt, which
        contains the relative path from the executable's directory to the
        platstdlib path.
        rrZrrgr)rrr\r[rrfrirjzbuild/lib.macos-9.8rlrmrnr)rprqz!/home/cpython/build/lib.macos-9.8rrNr}r-s    rtest_symlink_buildpath_macosz-MockGetPathTests.test_symlink_buildpath_macoss ).

	-.
12
,.DE
23
8;P:QR
34
45)$.($%!

X&6*r)__name__
__module____qualname__r
r1r>rDrLrPrRrUrWrcrsr{r~rrrrrrrrrrrr
__classcell__rs@rrrs+2+4#+J/+b+6+8+<+.+2+B+>+@+B+>+4!+F+2'+R-+^)+V++Z#+J+<%+rrr[r6rrVPATHr
PYDEBUGEXT
VERSION_MAJOR	
VERSION_MINORPYWINVER
EXE_SUFFIXr\rTrr@rrrrrrGr;venv_prefixhome
platlibdir
pythonpathprogram_namer!r"rBrCrr 
stdlib_dirplatstdlib_dirr$r#pythonpath_envargv	orig_argvisolatedrIruse_siteceZdZdddfd
ZddZdZdZdZdZd	Z	d
Z
dZdZd
Z
dZdZdZdZdZdZddZdZxZS)r&NrrHc.|jttj|d<d|d<d|d<d|d<d|d	<t	||i||r	|g|dd
<|r|dj|i|_i|_t|_	g|_
y)NrHntrDLLsrz9.8-XYrz..\..rr)updateDEFAULT_NAMESPACEDEFAULT_CONFIGcopyr	r
_files_linksset_dirs	_warningsrrrHr
rrs     rr
zMockNTNamespace.__init__ks%&',,.XY#\#Z W

!"r"+0'DN;'N!!&)U
rct|xsd|j|j<|j|j	ddy)N\r)listrcasefoldr)
rpartitionrpathliness   rr(zMockNTNamespace.add_known_file|s;'+EKR'8DMMO$4??4034rc&|j|yr)r(rrs  rr'zMockNTNamespace.add_known_xfilesD!rc>||j|j<yr)rrrrtargets   rrOzMockNTNamespace.add_known_links'-DMMO$rc|jdj}|r3|jj||j	dd}|r2yy)Nrr)rstriprraddrrrps   rr)zMockNTNamespace.add_known_dirsDKK&&(JJNN1T"1%ArcN	t||S#t$r
t|dwxYwrgetattrAttributeErrorKeyErrorrkeys  r__missing__zMockNTNamespace.__missing__/	*4%%	*3-T)	*$cL|j|r|S|jd|S)NzC:\Absoluteisabsjoinpathrs  rabspathzMockNTNamespace.abspaths$::dK}}^T22rc*|jddS)Nrrrs  rbasenamezMockNTNamespace.basenamest$Q''rcf|jdjdd}|dddk(r|dzS|S)Nrrr:rr)rrnames   rdirnamezMockNTNamespace.dirnames<{{4 ++D1!48s?$;rc\|jj|jSr)rendswithrrsuffixs   r	hassuffixzMockNTNamespace.hassuffixs }}''(9::rc|dddk(S)Nrz:\rrs  rrzMockNTNamespace.isabssAayE!!rc`tr
td|d|j|jvSNCheck ifzis a dir)rprintrrrs  risdirzMockNTNamespace.isdirs&*dJ/}}$**,,rc`tr
td|d|j|jvSNrz	is a file)rrrrrs  risfilezMockNTNamespace.isfiles&*dK0}}$++--rctr
td|d|j}||jvxr%|j	dddjk(SNrzis a module.r	pyrrrrrrs  rismodulezMockNTNamespace.ismodulesI*dM2}}t{{"Qts';A'>$--/'QQrctr
td|d|j}||jvxr%|j	dddjk(S)Nrzis a executabler"r	exer$rs  risxfilezMockNTNamespace.isxfilesK*d$56}}t{{"Rts';A'>%..BR'RRrcLtjtj|Sr)ntpathnormpathjoinrs  rrzMockNTNamespace.joinpathsv{{D122rcp	|j|jS#t$r
t|dwxYwr)rrrFileNotFoundErrorrs  r	readlineszMockNTNamespace.readliness8	4;;t}}//	4#D)t3	4s5c:trtd|	|j|j}|t}n|j|vrt
d|j|j|j||S#t$r|cYSwxYwNzRead link fromz
circular link)	rrrrrrOSErrorrrealpathrr_traillinks    rr3zMockNTNamespace.realpaths"D)	;;t}}/D>UF
]]_
&/**

4==?#}}T6**	K	sBBBc^|jj|trt|yyrrappendrrrmessages  rwarnzMockNTNamespace.warn#g&'Nrrrrrr
r(r'rOr)rrrrrrrrr%r(rr/r3r<rrs@rr&r&jsi!%d"5".&*3
(;"-
.
RS34+rr&cDeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
Zy)rJHKLMHKCUc|jDcic]\}}|j|c}}|_i|_ycc}}wr)itemsrkeysopen)rrDkvs    rr
zMockWinreg.__init__s415>AQZZ\1_>		?sAcy)Nz<MockWinreg>rrs r__repr__zMockWinreg.__repr__src,t|t|Sr)
isinstancetype)rothers  r__eq__zMockWinreg.__eq__s%d,,rc,t|jSr)rrErIs r	open_keyszMockWinreg.open_keyssDIIrctrtd|d|d|d|j}||jvr.|jj|ddz|j|<|St
)Nz
OpenKeyEx(, )rrr)rrrrDrEgetr.)rrKsubkeyrs    r	OpenKeyExzMockWinreg.OpenKeyExspJtfBvha01b!**,$))!YY]]32Q6DIIcNJ!!rctrtd|d|j}||jvrt	d|j|xxdzcc<|j|s|j|=yy)Nz	CloseKey(rTkey is not openr)rrrrERuntimeError)rrKs  rCloseKeyzMockWinreg.CloseKeysfIdV1%&}}tyy 011		$1yy		$rctrtd|d|d|j}||jvrt	d|d}t|jDcgc]"}|j|s|t|d$}}|Dcgc]	}d|vs|c}|ddt|D]\}}||k(s|j|cStdcc}wcc}w)NzEnumKey(rSrTrYrzend of enumeration)rrrrErZsortedrD
startswithlen	enumerateremoveprefixr2)rrKir!rFsubkeysjns        rEnumKeyzMockWinreg.EnumKeysHTF"QCq)*}}tyy 0116,2499,=VqfAU1S[\?VV!(:ADMa:
g&	.DAqAv~~f--	.*++W:sC5C	CCctrtd|d|d|j}||jvrt	d|r|j}|d|}	|j
|S#t$rtwxYw)NzQueryValue(rSrTrYr)rrrrErZrDrr2)rrKrVs   r
QueryValuezMockWinreg.QueryValuesKvRxq12}}tyy 011__&FV2fX&D	99T?"	)O	sA++A?N)
rrrHKEY_LOCAL_MACHINEHKEY_CURRENT_USERr
rJrOrQrWr[rfrhrrrrJrJs6-" ,rrJceZdZdddfd
ZddZdZdZdZdZd	Z	d
Z
dZdZd
Z
dZdZdZdZdZdZddZdZxZS)rbNrcB|jttj|d<d|d<d|d<d|d<t	||i||r	|g|dd<|r|dj|i|_t|_i|_	t|_
g|_y)	NrHposixrlibrrrr)rrrrr	r
rr_xfilesrrrrs     rr
zMockPosixNamespace.__init__s%&',,.X!Y"\&'
"#
!"r"+0'DN;'N!!&)uU
rct|xsd|j|<|j|jddy)Nr/r)rrr)rrs   rr(z!MockPosixNamespace.add_known_file,s5 "-D4??3/23rc\|j||jj|yr)r(rorrs  rr'z"MockPosixNamespace.add_known_xfile0s"D!rc"||j|<yr)rrs   rrOz!MockPosixNamespace.add_known_link4s"Drc|jd}|r3|jj||jdd}|r2yyNrqr)rrrrrs   rr)z MockPosixNamespace.add_known_dir7s;KKJJNN1S!!$ArcN	t||S#t$r
t|dwxYwrrrs  rrzMockPosixNamespace.__missing__=rrcL|j|r|S|jd|S)Nz	/Absoluterrs  rrzMockPosixNamespace.abspathCs$::dK}}[$//rc*|jddS)Nrqr	r
rs  rrzMockPosixNamespace.basenameHss#A&&rcH|jdjddSrurrs  rrzMockPosixNamespace.dirnameKs!{{3**3/22rc$|j|Sr)rrs   rrzMockPosixNamespace.hassuffixNs}}V$$rc|dddk(S)Nrrrqrrs  rrzMockPosixNamespace.isabsQsAayCrcDtr
td|d||jvSr)rrrrs  rrzMockPosixNamespace.isdirTs *dJ/tzz!!rcDtr
td|d||jvSr)rrrrs  rrzMockPosixNamespace.isfileYs *dK0t{{""rcvtr
td|d||jvxr|jdddk(Sr!)rrrrrs  rr%zMockPosixNamespace.ismodule^s8*dM2t{{"Fts';A'>$'FFrcDtr
td|d||jvS)Nrzis an xfile)rrrors  rr(zMockPosixNamespace.isxfilecs *dM2t||##rcLtjtj|Sr)	posixpathr+r,rs  rrzMockPosixNamespace.joinpathhs!!)..$"788rcT	|j|S#t$r
t|dwxYwr)rrr.rs  rr/zMockPosixNamespace.readlinesks2	4;;t$$	4#D)t3	4s'ctrtd|	|j|}|t	}n||vrtd|j
||j||S#t$r|cYSwxYwr1)rrrrrr2rr3r4s    rr3zMockPosixNamespace.realpathqsv"D)	;;t$D>UF
V^/**

4}}T6**	K	sA""A0/A0c^|jj|trt|yyrr8r:s  rr<zMockPosixNamespace.warnr=rrr>rs@rrbrbsh!%d"4#%*0
'3% "
#
G
$
94+rrbc
g}t|D]P}|dddk(r|dk(rt||||d&||vs+||||k7s7|j|||||fR|sytd|D}dt	|dz|zz}t
rg|D]a\}}}|r.t
dj||j||||7t
d	j||j||cyy)
Nr	__rHr!c3:K|]\}}}t|ywrr_).0rF_s   r	<genexpr>zdiff_dict.<locals>.<genexpr>s+71aA+s rz{}.{} -{!r}
{} +{!r}z{}.{} +{!r})	r]	diff_dictr9maxr_rrformatljust)	beforeafterr!diffrFmax_kindentbr
s	         rrrs
D
F^2Ra5D==fQiq(;:%(fQi/KKF1IuQx012+d++E
CK!Oe+
,F	GGAq!-44VQWWU^QPVXYZ[m**61775>1EF		Grc
tr|sytd|D}t|jdD]\}}|dddk(r|dk(rt	||||d)	|||k7r0tdj
||j||||b	td	j
||j||y#t$rY9wxYw)
Nc32K|]}t|ywrr)rrFs  rrzdump_dict.<locals>.<genexpr>s&1A&sc|dS)Nrr)rbs r<lambda>zdump_dict.<locals>.<lambda>s
AaDr)rr	rrHrz{}.{} {!r} (was {!r})z
{}.{} {!r})	rrr]rC	dump_dictrrrr)rrr!rrFrGs      rrrs%&&&Eu{{}.9>1Ra5D==fQiq(;	F1I~-44VQWWU^QPVWXPYZ[
	l!!&!''%.!<=>		s"7C			CCc@tj|}d}	tt|d}|r
t	||n
t||	|Dcic](}||dj
||j
|d*c}S#|r
t	||wt||wxYwcc}w)NTFrH.)rdeepcopyexecSOURCErrrU)r.rDrfailedrFs     rr+r+s
]]2
F
F"VRfb!fb!
	
2h<Arvva~..	fb!fb!sA;-B;Br)global)rr*pathlibrunittesttest.supportrPath__file__absoluteparent
read_bytesrr._testinternalcapirTestCaserr*rrr&rJrbrrr+rrr<module>rsv
 &gll8$--/66==DDG[[
g
g
iFa+x((a+L

	

 
!"#$%&'(
)*+,-./4	
	

 
!"#&'()*+0ldl^>>BhhVG,>&E%&8
#
%F&sAD66E
E