python (3.11.7)

(root)/
lib/
python3.11/
test/
__pycache__/
test_exception_hierarchy.cpython-311.opt-2.pyc

e)ddlZddlZddlZddlZddlZddlZddlmZGddeZGddeZ	GddeZ
Gd	d
e	e
ZGdde
e	ZGd
deZ
GddejZGddejZGddejZedkrejdSdS)N)EEXISTceZdZdS)
SubOSErrorN__name__
__module____qualname__Q/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/test/test_exception_hierarchy.pyrr
DrrceZdZfdZxZS)SubOSErrorWithInitcX||_t|dSN)barsuper__init__)selfmessager	__class__s   rrzSubOSErrorWithInit.__init__s(
!!!!!r)rrr	r
__classcell__rs@rrr
s8"""""""""rrceZdZfdZxZS)SubOSErrorWithNewcZt||}||_|Sr)r__new__baz)clsrrrrs    rrzSubOSErrorWithNew.__new__s&wwsG,,r)rrr	rrrs@rrrs8rrceZdZdS)SubOSErrorCombinedInitFirstNrr
rrr!r!r
rr!ceZdZdS)SubOSErrorCombinedNewFirstNrr
rrr#r#r
rr#ceZdZdZdS)SubOSErrorWithStandaloneInitcdSrr
rs rrz%SubOSErrorWithStandaloneInit.__init__srN)rrr	rr
rrr%r%s#




rr%cLeZdZdZdZdZdZdZeeZdZ	dZ
dS)	
HierarchyTestc|tjd|tt|t
tdS)NOSError)assertEqualr+rassertIsIOErrorEnvironmentErrorr's rtest_builtin_errorsz!HierarchyTest.test_builtin_errors%sJ)9555

gw'''

&00000rcB|tjt|tjjt|tjjt|tjtdSr)	r-socketerrorr+gaierror__base__herrortimeoutTimeoutErrorr's rtest_socket_errorsz HierarchyTest.test_socket_errors*sf

flG,,,

fo.888

fm,g666

fnl33333rcP|tjtdSr)r-selectr3r+r's rtest_select_errorzHierarchyTest.test_select_error0s

flG,,,,,rae
        +-- BlockingIOError        EAGAIN, EALREADY, EWOULDBLOCK, EINPROGRESS
        +-- ChildProcessError                                          ECHILD
        +-- ConnectionError
            +-- BrokenPipeError                              EPIPE, ESHUTDOWN
            +-- ConnectionAbortedError                           ECONNABORTED
            +-- ConnectionRefusedError                           ECONNREFUSED
            +-- ConnectionResetError                               ECONNRESET
        +-- FileExistsError                                            EEXIST
        +-- FileNotFoundError                                          ENOENT
        +-- InterruptedError                                            EINTR
        +-- IsADirectoryError                                          EISDIR
        +-- NotADirectoryError                                        ENOTDIR
        +-- PermissionError                        EACCES, EPERM, ENOTCAPABLE
        +-- ProcessLookupError                                          ESRCH
        +-- TimeoutError                                            ETIMEDOUT
    ci}|D]}|d}|s|d\}}}td|dD]I}|dkrtt|stt||tt|<J|S)Nz+-  z, ENOTCAPABLE)	
splitlinesstrip	partitionfiltersplithasattrerrnogetattrbuiltins)s_maplineexcname_errnameserrnames       r	_make_mapzHierarchyTest._make_mapFsLLNN	K	KD::e$$D
#'>>##6#6 GQ!$(8(8(>(>t(D(DEE
K
Km++GE74K4K+07'0J0JWUG,,--
Krcttd}|t|t|jD]8\}}t|d}|t||9ttj	t|jz
}|D]H}t|d}|t|tt|IdS)NBad file descriptorzSome message)r+rr-typeFileExistsErrorrJitemssetrF	errorcoderepr)reerrcodeexc
othercodess     rtest_errno_mappingz HierarchyTest.test_errno_mappingTs
F122

d1gg/// IOO--	(	(LGS00AMM$q''3''''))C	NN:
!	5	5G00AMM$q''7DGG4444	5	5rcPd}	t||dn#t$rYnwxYw|tj|	t	j||ddS#t$rYdSwxYw)N some_hopefully_non_existing_filez&should have raised a FileNotFoundError)openfailFileNotFoundErrorassertFalseospathexistsunlink)rfilenames  rtest_try_exceptzHierarchyTest.test_try_exceptbs5	@NNN
II>????!			D		
11222	@Ih
II>?????!			DD	s)
66,B
B%$B%N)rrr	r0r9r<_pep_maprPrJr]rir
rrr)r)#s111
444---
H"9XD555@@@@@rr)cfeZdZdZdZejejdkddZ	dZ
dS)AttributesTestctjdkr*|dttdS|dttdS)Nntwinerror)rdnameassertIndirr+assertNotInr's rtest_windows_errorz!AttributesTest.test_windows_error|sO
7d??MM*c'll33333ZW66666rcttdd}||jt||jdt||jd||jdtjdkr||j	ddSdS)NFile already existsfoo.txtrrn)
r+rr,rFargsstrerrorrhrdrprorrYs  rtest_posix_errorzAttributesTest.test_posix_errorsF19==&)))F+++%:;;;Y///
7d??QZ.....?rrnzWindows-specific testcXtdddd}||jd||jt||jdt||jd||jddS)Nrrvrw)r+r,rorFrrxryrhrzs  rtest_errno_translationz%AttributesTest.test_errno_translations
A,i==S)))&)))F+++%:;;;Y/////rc>d}tdD]}t|d|}|t5|jdddn#1swxYwY|t5|`dddn#1swxYwYtddd}||jdd|_||jd|`|t5|jddddS#1swxYwYdS)N)abcdrYrr)rangeBlockingIOErrorassertRaisesAttributeErrorcharacters_writtenr,)rrxnrYs    rtest_blockingioerrorz#AttributesTest.test_blockingioerrors(q	)	)Abqb*A"">22
%
%$$
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%"">22
)
)(
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)Ca((-q111 -q111
 


~
.
.	!	!
  	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!s5AA	A	8BB	B	=DDDN)rrr	rtr{unittest
skipUnlessrdrpr~rr
rrrlrlzst777///XD*ABB00CB0!!!!!rrlc8eZdZdZdZdZdZdZdZdZ	dS)	ExplicitSubclassingTestcttd}|t|tdS)NrR)rrr-rSrzs  rr]z*ExplicitSubclassingTest.test_errno_mappings2v455

d1ggz*****rctdd}||jd||jddSNsome messagerrrr,rrxrzs  rtest_init_overriddenz,ExplicitSubclassingTest.test_init_overriddensH~u55&&&!233333rctdd}||jd||jddS)Nrr)rrrrzs  rtest_init_kwdargsz)ExplicitSubclassingTest.test_init_kwdargssK~5999&&&!233333rctdd}||jd||jddSrrr,rrxrzs  rtest_new_overriddenz+ExplicitSubclassingTest.test_new_overriddensHne44&&&!233333rctdd}||jd||jddS)Nrr)rrrrzs  rtest_new_kwdargsz(ExplicitSubclassingTest.test_new_kwdargssKn%888&&&!233333rctdd}||jd||jd||jdtdd}||jd||jd||jddSr)r!r,rrrxr#rzs  rtest_init_new_overriddenz0ExplicitSubclassingTest.test_init_new_overriddens'>>&&&&&&!2333&~u==&&&&&&!233333rct}||jd|t|ddS)Nr
)r%r,rxstrrzs  rtest_init_standalonez,ExplicitSubclassingTest.test_init_standalonesG(**$$$Q$$$$$rN)
rrr	r]rrrrrrr
rrrrs}+++
444
444
444
444
444%%%%%rr__main__)rHrdr;r2rrFrr+rrrr!r#r%TestCaser)rlrrmainr
rr<module>rs				







								""""""""
					"46G								!24F			




7


T@T@T@T@T@H%T@T@T@n)!)!)!)!)!X&)!)!)!X)%)%)%)%)%h/)%)%)%XzHMOOOOOr