+
    Bi9                         ^ RI t^ RIt^ RIt^ RIHt ^ RIHt ^ RIHt ^ RI	t	]
! ]	4      t ! R R4      t ! R R4      t ! R	 R
]P                  4      t]R8X  d   ]P"                  ! 4        R# R# )    N)
gc_collect)import_helper)assert_python_okc                       ] tR t^tRtR# )
FullLoader N__name__
__module____qualname____firstlineno____static_attributes__r       0/usr/lib/python3.14/test/test_module/__init__.pyr   r          r   r   c                       ] tR t^tRtR# )
BareLoaderr   Nr	   r   r   r   r   r      r   r   r   c                   
  a  ] tR t^t o R tR tR tR tR tR t	R t
R tR	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t R t!R t"R  t#R! t$R" t%R# t&R$ t'R% t(R& t)R' t*R(t+V t,R)# )*ModuleTestsc                   \         P                  \         4      pV P                  \        VP                  \
        4      4       V P                  \        V4      . 4        VP                  pV P                  R \        V4      ,          4       T P                  VP                  \         P                  ;'       g    R4       R#   \         d     LCi ; i)z__name__ = %s N)
ModuleType__new__
assertTrue
isinstance__dict__dictassertEqualdirr
   failreprAttributeError__doc__)selffooss   &  r   test_uninitializedModuleTests.test_uninitialized   s       ,
3<<67S2&	AIIoQ/0 	j&8&8&>&>B?  		s   -C CCc                r    \         P                  \         4      pV P                  \        R \        VR4       R# )z"module has no attribute 'not_here'not_hereN)r   r   assertRaisesRegexr"   getattrr$   r%   s   & r   "test_uninitialized_missing_getattr.ModuleTests.test_uninitialized_missing_getattr#   s/       , Dj	*r   c                V    \        R 4      pV P                  \        R\        VR4       R# )r%   z(module 'foo' has no attribute 'not_here'r*   N)r   r+   r"   r,   r-   s   & r   test_missing_getattr ModuleTests.test_missing_getattr+   s)      Jj	*r   c                   \        R 4      pV P                  VP                  R 4       V P                  VP                  R4       V P	                  VP
                  R4       V P	                  VP                  R4       V P	                  VP                  R4       V P                  VP                  RR RRRRRRRR/4       R# )r%   Nr
   r#   
__loader____package____spec__)	r   r   r
   r#   assertIsr4   r5   r6   r   r-   s   & r   test_no_docstringModuleTests.test_no_docstring3   s    u-d+cnnd+coot,cllD)
E9d(4dM4(2D(: 	;r   c                    \        R R4      pV P                  VP                  R 4       V P                  VP                  R4       V P                  VP                  RR RRRRRRRR/4       R# )r%   foodocr
   r#   r4   Nr5   r6   r   r   r
   r#   r   r-   s   & r   test_ascii_docstring ModuleTests.test_ascii_docstring?   sf    )u-h/$eY&mT$d,	-r   c                    \        R R4      pV P                  VP                  R 4       V P                  VP                  R4       V P                  VP                  RR RRRRRRRR/4       R# )r%   	   foodocሴr
   r#   r4   Nr5   r6   r<   r-   s   & r   test_unicode_docstring"ModuleTests.test_unicode_docstringI   sf    /u-n5$eY&mT$d,	-r   c                   \        R R4      p^*Vn        VP                  pVP                  R R4       V P	                  VP
                  R 4       V P	                  VP                  R4       V P	                  VP                  ^*4       V P	                  VP                  RR RRR^*RRRRR	R/4       V P                  VP                  VJ 4       R# )
r%   r@   r;   r
   r#   barr4   Nr5   r6   )r   rD   r   __init__r   r
   r#   r   )r$   r%   ds   &  r   test_reinitModuleTests.test_reinitS   s    /LLUH%u-h/"%5)XubT=$
DJ	K 	)*r   c                p    R  p\        4        V P                  V! 4       P                  R,          ^4       R# )c                  *    \        R 4      p ^V n        V # r%   )r   rD   rK   s    r   f+ModuleTests.test_dont_clear_dict.<locals>.fc   s    U#CCGJr   rD   N)r   r   r   )r$   rL   s   & r   test_dont_clear_dict ModuleTests.test_dont_clear_dicta   s)    	 	e,a0r   c                    . p\        R 4      pWn        Rp\        W2P                  4       ?\	        4        V P                  V^.4       R# )r%   zwclass A:
    def __init__(self, l):
        self.l = l
    def __del__(self):
        self.l.append(1)
a = A(destroyed)N)r   	destroyedexecr   r   r   )r$   rQ   mr&   s   &   r   test_clear_dict_in_ref_cycle(ModuleTests.test_clear_dict_in_ref_cyclej   sE    	u 	Q

QC(r   c                    \        R 4      p\        P                  ! V4      pV P                  V! 4       V4       ?\	        4        V P                  V! 4       R4       R# r%   N)r   weakrefrefr7   r   )r$   rS   wrs   &  r   test_weakrefModuleTests.test_weakrefy   sA    u[[^bdAbdD!r   c                   ^ RI Hu Hp ^ RI Hp V P	                  VR4       V P	                  VP
                  ^4       V P	                  VP                  ^4       V P                  \        R4      ;_uu_ 4        VP                   RRR4       V P	                  VP                  R4       \        P                  R R#   + '       g   i     L?; i)r   N)testzThere is testz Deprecated, use whatever insteadzThere is whatevertest.test_module.good_getattr)test.test_module.good_getattrtest_modulegood_getattrr^   r   xyr+   r"   yolowhateversysmodules)r$   ggar^   s   &  r   test_module_getattrModuleTests.test_module_getattr   s    336/""##N$FH HHHH 	':;KK78	H Hs   8B<<C	c                   ^ RI Hu Hp ^ RIHp V P                  VP                  ^4       V P                  VP                  ^4       V P                  \        4      ;_uu_ 4        VP                   RRR4       V P                  \        4      ;_uu_ 4        VP                   RRR4       \        P                  R R\        P                  9   d   \        P                  R R# R#   + '       g   i     L}; i  + '       g   i     L^; ir   N)bad_getattr2ztest.test_module.bad_getattrztest.test_module.bad_getattr2)test.test_module.bad_getattrra   bad_getattrtest.test_modulern   r   rc   assertRaises	TypeErrornoperg   rh   r$   bgarn   s   &  r   test_module_getattr_errors&ModuleTests.test_module_getattr_errors   s    221"+y))HH *y)) *KK67*ckk9;< : *)))s   %C'C:'C7	:D
	c                t    ^ RI Hu Hp V P                  \	        V4      . RO4       \
        P                  R R# )r   Nr_   )abc)r`   ra   rb   r   r   rg   rh   )r$   ri   s   & r   test_module_dirModuleTests.test_module_dir   s)    33S?3KK78r   c                   ^ RI Hu Hp ^ RIHp V P                  \        4      ;_uu_ 4        \        V4       RRR4       V P                  \        4      ;_uu_ 4        \        V4       RRR4       \        P                  R R\        P                  9   d   \        P                  R R# R#   + '       g   i     L|; i  + '       g   i     L^; irm   )
ro   ra   rp   rq   rn   rr   rs   r   rg   rh   ru   s   &  r   test_module_dir_errors"ModuleTests.test_module_dir_errors   s    221y))H *y)) *KK67*ckk9;< : *)))s   B-C -B=	 C	c                v   ^ RI Hp V P                  \        4      ;_uu_ 4        VP                   RRR4       V P                  \        4      ;_uu_ 4        VP
                   RRR4       R\        P                  9   d   \        P                  R R# R#   + '       g   i     Ll; i  + '       g   i     LM; i)r   )bad_getattr3Nztest.test_module.bad_getattr3)rq   r   rr   r"   one
delgetattrrg   rh   )r$   r   s   & r   test_module_getattr_tricky&ModuleTests.test_module_getattr_tricky   sq    1~.. /~..## /*ckk9;< :	 /...s   BB(B%	(B8	c                V    \        R 4      pV=V P                  \        V4      R4       R# )r%   z<module '?'>N)r   r
   r   r!   r$   rS   s   & r   test_module_repr_minimal$ModuleTests.test_module_repr_minimal   s%    uJa.1r   c                R    \        R 4      pV P                  \        V4      R4       R# r%   z<module 'foo'>Nr   r   r!   r   s   & r   test_module_repr_with_name&ModuleTests.test_module_repr_with_name   s!    ua"23r   c                `    \        R 4      pRVn        V P                  \        V4      R4       R# r%   /tmp/foo.pyz!<module 'foo' from '/tmp/foo.py'>N)r   __file__r   r!   r   s   & r   'test_module_repr_with_name_and_filename3ModuleTests.test_module_repr_with_name_and_filename   s(    u"
a"EFr   c                d    \        R 4      pV=RVn        V P                  \	        V4      R4       R# )r%   r   z<module '?' from '/tmp/foo.py'>N)r   r
   r   r   r!   r   s   & r   #test_module_repr_with_filename_only/ModuleTests.test_module_repr_with_filename_only   s-    uJ"
a"CDr   c                R    \        R 4      pV P                  \        V4      R4       R# r   r   r   s   & r   $test_module_repr_with_loader_as_None0ModuleTests.test_module_repr_with_loader_as_None   s!    ua"23r   c                    \        R 4      pV=\        Vn        \	        \        4      pV P                  \	        V4      RP                  V4      4       R# r%   z<module '?' ({})>N)r   r
   r   r4   r!   r   formatr$   rS   loader_reprs   &  r   -test_module_repr_with_bare_loader_but_no_name9ModuleTests.test_module_repr_with_bare_loader_but_no_name   sE    uJ!:&G(//<	>r   c                    \        R 4      pV=\        Vn        \	        \        4      pV P                  \	        V4      RP                  V4      4       R# r   )r   r
   r   r4   r!   r   r   r   s   &  r   -test_module_repr_with_full_loader_but_no_name9ModuleTests.test_module_repr_with_full_loader_but_no_name   sG     uJ!:&G(//<	>r   c                    \        R 4      p\        Vn        \        \        4      pV P	                  \        V4      RP                  V4      4       R# )r%   z<module 'foo' ({})>N)r   r   r4   r!   r   r   )r$   rS   module_reprs   &  r   !test_module_repr_with_bare_loader-ModuleTests.test_module_repr_with_bare_loader   sA    u!:&G*11+>	@r   c                x    \        R 4      p\        Vn        V P                  \	        V4      R\
         R24       R# )r%   z<module 'foo' (<class 'z.FullLoader'>)>N)r   r   r4   r   r!   r
   r   s   & r   !test_module_repr_with_full_loader-ModuleTests.test_module_repr_with_full_loader   s5    u!G.xjH	Jr   c                v    \        R 4      p\        Vn        RVn        V P	                  \        V4      R4       R# r   )r   r   r4   r   r   r!   r   s   & r   .test_module_repr_with_bare_loader_and_filename:ModuleTests.test_module_repr_with_bare_loader_and_filename   /    u!"
a"EFr   c                v    \        R 4      p\        Vn        RVn        V P	                  \        V4      R4       R# r   )r   r   r4   r   r   r!   r   s   & r   .test_module_repr_with_full_loader_and_filename:ModuleTests.test_module_repr_with_full_loader_and_filename   r   r   c                D    V P                  \        \        4      R 4       R# )z<module 'sys' (built-in)>N)r   r!   rg   )r$   s   &r   test_module_repr_builtin$ModuleTests.test_module_repr_builtin   s    c$?@r   c                    \        \        4      pR pRpV P                  VR\        V4       VRP	                  W4      4       V P                  V\        V4      ) R VRP	                  W4      4       R# )z<module 'unittest' from 'z__init__.py'>Nz{!r} does not start with {!r}z{!r} does not end with {!r})r!   unittestr   lenr   )r$   rstarts_with	ends_withs   &   r   test_module_repr_source#ModuleTests.test_module_repr_source  sr    N1#	,C,-{8??O	QC	N?+,i6==aK	Mr   c                    \        R 4      p\        P                  P                  R R.R4      p\        P                  P	                  R V4      pW!n        W1n        V P                  \        V4      R4       R# )r%   rD   bazz'<module 'foo' (namespace) from ['bar']>N)	r   	importlib	machineryNamespaceLoader
ModuleSpecr4   r6   r   r!   )r$   rS   loaderspecs   &   r   'test_module_repr_with_namespace_package3ModuleTests.test_module_repr_with_namespace_package  s_    u$$44UUGUK""--eV<
a"KLr   c                    \        R 4      p\        4       p\        P                  P	                  R V4      pW!n        W1n        RpV P                  \        V4      V4       V P                  R\        V4      4       R# )r%   0<module 'foo' \(<.*\.BareLoader object at .+>\)>fromN)
r   r   r   r   r   r4   r6   assertRegexr!   assertNotInr$   rS   r   r   expected_repr_patterns   &    r   9test_module_repr_with_namespace_package_and_custom_loaderEModuleTests.test_module_repr_with_namespace_package_and_custom_loader  sd    u""--eV<
 Sa"78a)r   c                   \        R 4      p\        4       pR.Vn        \        P                  P                  R V4      pW!n        W1n        RpV P                  \        V4      V4       V P                  R\        V4      4       R# )r%   spamr   r   N)r   r   _pathr   r   r   r4   r6   r   r!   r   r   s   &    r   ,test_module_repr_with_fake_namespace_package8ModuleTests.test_module_repr_with_fake_namespace_package  sm    ux""--eV<
 Sa"78a)r   c                    \        R R4      w  rpV P                  V4       VP                  4       pV P                  \	        V4      0 Rm4       R# )z-cz$from test.test_module import final_aN>      x = a   x = b	   len = len   final_a.x = a   final_b.x = b   shutil.rmtree = rmtree)r   assertFalse
splitlinesr   set)r$   rcouterrliness   &    r   $test_module_finalization_at_shutdown0ModuleTests.test_module_finalization_at_shutdown)  sF    '.TU U &' 	(r   c                   a  ! R  R4      o ! V3R lR\         4      pV P                  \        \        V! R4      R4       R# )c                   &   a  ] tR tRt o R tRtV tR# );ModuleTests.test_descriptor_errors_propagate.<locals>.Descri7  c                    \         hN)RuntimeError)r$   ots   &&&r   __get__CModuleTests.test_descriptor_errors_propagate.<locals>.Descr.__get__8  s    ""r   r   N)r
   r   r   r   r   r   __classdictcell____classdict__s   @r   Descrr   7  s     # #r   r   c                   (   < ] tR tRt Z ! 4       tRtR# )7ModuleTests.test_descriptor_errors_propagate.<locals>.Mi:  r   N)r
   r   r   r   melonr   )r   s   r   Mr   :  s
    GEr   r   mymodr   N)r   rr   r   r,   )r$   r   r   s   & @r    test_descriptor_errors_propagate,ModuleTests.test_descriptor_errors_propagate6  s1    	# 	#	
 	,7WEr   c                   \        R 4      p\        ^4       F  pV P                  RVP                  9   4       VP                  pV P                  RVP                  9   4       V P                  VP                  V4       V P                  VP                  R,          V4       V^,          '       d   V=K  VP                  R K  	  R# )r%   __annotations__N)r   ranger   r   r   r   r   r$   r%   irF   s   &   r   test_lazy_create_annotations(ModuleTests.test_lazy_create_annotations>  s     qA.#,,>?##AOO-=>S00!4S\\*;<a@1uu'LL!23 r   c                   \        R 4      p\        ^4       F  pV P                  RVP                  9   4       R\        /pW1n        V P                  RVP                  9   4       V P                  VP
                  V4       V P                  VP                  R,          V4       V^,          '       d   V=K  VP                  R K  	  R# )r%   r   rz   N)r   r   r   r   intr   r   r   r   s   &   r   test_setting_annotations$ModuleTests.test_setting_annotationsN  s    qA.#,,>?c
A"#OO-=>S00!4S\\*;<a@1uu'LL!23 r   c                    \        R 4      p/ Vn        V=V P                  \        4      ;_uu_ 4        V=RRR4       R#   + '       g   i     R# ; irW   )r   r   rr   r"   r-   s   & r   test_annotations_getset_raises*ModuleTests.test_annotations_getset_raises\  s@     ~..# /...s	   ?A	c                :   \         P                  ! R 4      pV P                  RVP                  9   4       V P	                  VP
                  R\        R\        /4       V P                  RVP                  9   4       V=V P                  RVP                  9   4       R# )ztest.typinganndata.ann_module4r   rz   r{   N)	r   import_fresh_moduler   r   r   r   r  strr   )r$   ann_module4s   & r   &test_annotations_are_created_correctly2ModuleTests.test_annotations_are_created_correctlyd  s    #77,
 	*k.B.BBC44sCc6JK)[-A-AAB'*k.B.BBCr   c                    \        R 4      pVP                  p^ p\        ^d4       F-  p^Vn        W1P                  ,          pVP	                  R4       K/  	  V P                  V^d4       R# )r^   attrN)r   r   r   r  popr   )r$   rS   rF   count_s   &    r   test_repeated_attribute_pops(ModuleTests.test_repeated_attribute_popso  sY     vJJsAAFVVOEEE&M  	$r   c                    ! R  R\         4      pV! R4      pV P                  \        4      ;_uu_ 4        VP                   RRR4       V P                  \        4      ;_uu_ 4        VP                   RRR4       ^^uVn        Vn        V P                  VP                  ^4       V P                  VP                  ^4       R#   + '       g   i     L; i  + '       g   i     Ll; i)c                   6   a a ] tR tRt oRtV 3R ltRtVtV ;t# )=ModuleTests.test_subclass_with_slots.<locals>.ModuleWithSlotsi  c                &   < \         SV `  V4       R # r   )superrE   )r$   name	__class__s   &&r   rE   FModuleTests.test_subclass_with_slots.<locals>.ModuleWithSlots.__init__  s     &r   r   )rz   r{   )	r
   r   r   r   	__slots__rE   r   r   __classcell__)r  r   s   @@r   ModuleWithSlotsr    s     "I' 'r   r"  r  N)r   rr   r"   rz   r{   r   )r$   r"  rS   s   &  r   test_subclass_with_slots$ModuleTests.test_subclass_with_slots}  s    	'j 	' F#~..CC /~..CC /aQSa a  /...s   C'CC	C(	r   N)-r
   r   r   r   r'   r.   r1   r8   r=   rA   rG   rN   rT   r[   rj   rw   r}   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r	  r  r  r#  r   r   r   s   @r   r   r      s     @**
;--+1)"
9=9
	==24G
E4
>
>@JGGAMM*	*(F4 4$D
%! !r   r   __main__)importlib.machineryr   r   rX   test.supportr   r   test.support.script_helperr   rg   typer   r   r   TestCaser   r
   mainr   r   r   <module>r,     sd       # & 7 
#Y
	 		 	x!(## x!x zMMO r   