+
    BiF                     >   ^ RI t ^ RIt^ RIt^ RIHt ^ RIHt ^ RIt^ RIt ! R R]]P                  4      t
 ! R R4      t ! R R	]P                  4      t ! R
 R]P                  4      t ! R R]P                  4      tR t]R8X  d   ]P"                  ! 4        R# R# )    N)support)AbstractPickleTestsc                   D   a  ] tR t^	t o RR ltR tRtRtR tR t	Rt
V tR# )OptimizedPickleTestsNc                X    \         P                  ! \        P                  ! W3/ VB 4      # N)pickletoolsoptimizepickledumps)selfargprotokwargss   &&&,,/usr/lib/python3.14/test/test_pickletools.pyr   OptimizedPickleTests.dumps   s!    ##FLL$Fv$FGG    c                0    \         P                  ! V3/ VB # r   )r   loads)r   bufkwdss   &&,r   r   OptimizedPickleTests.loads   s    ||C(4((r   c                   \        R 4       Uu. uF  p\        V4      NK  	  ppVP                  VR,          4       \        \        P                  ^,           4       F  p\        P
                  ! W#4      p\        P                  ! V4      pV P                  WR4       V P                  VR,          VR,          4       \        P                  ! V4      p\        P                  ! V4      pV P                  Wr4       V P                  VR,          VR,          4       V P                  \        P                  V4       V P                  \        P                  V4       K  	  R# u upi )i  N)rangestrappendr   HIGHEST_PROTOCOLr   r   assertEqualassertIsr	   r
   assertNotInLONG_BINGETLONG_BINPUT)r   idatar   pickled	unpickledpickled2
unpickled2s   &       r   test_optimize_long_binget.OptimizedPickleTests.test_optimize_long_binget   s     %c
+
1A
+DH622Q67Ell4/GW-IY-MM)B-27"++G4Hh/JZ.MM*R.*R.9V//:V//: 8 ,s   Ec                   R pV P                  \        P                  V4       \        P                  ! V4      pV P	                  V. RO4       V P                  V^,          V^,          4       \        P                  ! V4      p\        P                  ! V4      pV P	                  V. RO4       V P                  V^,          V^,          4       V P                  \        P                  V4       R# )s           ](spamqhamhe.N)spamhamr/   )	assertInr   BINPUTr   r    r!   r	   r
   r"   )r   r'   r(   r)   r*   s   &    r    test_optimize_binput_and_memoize5OptimizedPickleTests.test_optimize_binput_and_memoize'   s    D 	fmmW-LL)	$:;ilIaL1''0\\(+
%;<jmZ]31r    r   )__name__
__module____qualname____firstlineno__r   r   test_pickle_to_2x+test_framed_write_sizes_with_delayed_writerr+   r2   __static_attributes____classdictcell____classdict__s   @r   r   r   	   s/     H)  37/; 2 2r   r   c                   2   a  ] tR t^Bt o R tR tR tRtV tR# )SimpleReaderc                     Wn         ^ V n        R# )r   Nr&   pos)r   r&   s   &&r   __init__SimpleReader.__init__C   s    	r   c                    V P                   V P                  V P                  V,            pV ;P                  V,          un        V# r   rB   )r   nr&   s   && r   readSimpleReader.readG   s0    yy488a<0Ar   c                    V P                   P                  R V P                  4      ^,           pV'       g   \        V P                   4      pV P                   V P                  V pWn        V# )   
)r&   findrC   len)r   nlr&   s   &  r   readlineSimpleReader.readlineL   sM    YY^^E488,q0TYYByy2&r   rB   N)	r5   r6   r7   r8   rD   rH   rO   r;   r<   r=   s   @r   r@   r@   B   s     
 r   r@   c                   J   a  ] tR t^Ut o R tR tR tR tR tR t	R t
RtV tR	# )
GenopsTestsc                    \         P                  ! R 4      pT P                  V Uu. uF$  q"^ ,          P                  3VR,          ,           NK&  	  up. RO4       R# u upi )   (I123
KJ4Vxt.   NNN))MARKNr   )INT{   rV   )BININT1      )BININT4Vx   )TUPLEN   )STOPN   )r	   genopsr    namer   ititems   &  r   test_genopsGenopsTests.test_genopsV   sO     BC"E"$7<</T"X55"E H
 	Es   *Ac                p   \         P                  ! R 4      pV P                  VP                  ^4      R4       \        P
                  ! V4      pT P                  V Uu. uF$  q3^ ,          P                  3VR,          ,           NK&  	  up. RO4       V P                  VP                  4       R4       R# u upi )s   prefix(I123
KJ4Vxt.suffixs   prefixrU   Ns   suffix))rW   Nr\   )rX   rY      )rZ   r[      )r]   r^   rc   )r`   N   )rb   N   )ioBytesIOr    rH   r	   rd   re   r   frg   rh   s   &   r   test_from_fileGenopsTests.test_from_filea   s    JJEFI.""E"$7<</T"X55"E H
 	 	9- Fs   *B3c                    \        R 4      p\        P                  ! V4      pT P                  V Uu. uF$  q3^ ,          P                  3VR,          ,           NK&  	  up. RO4       R# u upi )rT   rU   N))rW   NN)rX   rY   N)rZ   r[   N)r]   r^   N)r`   NN)rb   NN)r@   r	   rd   r    re   rr   s   &   r   test_without_posGenopsTests.test_without_poso   sY    ;<""E"$7<</T"X55"E H
 	Es   *A'c                   \         P                  ! R 4      p\        V4      pV P                  V^ ,          P                  R4       V P                  \        R4      ;_uu_ 4        \        V4       RRR4       R#   + '       g   i     R# ; i)   NNONE#pickle exhausted before seeing STOPNr	   rd   nextr    re   assertRaisesRegex
ValueErrorrf   s   &  r   test_no_stopGenopsTests.test_no_stop{   sg    %Bxav.##J57 7H7 7 7 7   #A99B
	c                t   \         P                  ! R 4      pV P                  \        R4      ;_uu_ 4        \	        V4       RRR4       \         P                  ! R4      pV P                  \        R4      ;_uu_ 4        \	        V4       RRR4       R#   + '       g   i     LZ; i  + '       g   i     R# ; i)s   I123-no newline found when trying to read stringnlNs   J4&not enough data in stream to read int4)r	   rd   r   r   r~   )r   rg   s   & r   test_truncated_dataGenopsTests.test_truncated_data   s    (##J?A AHA -##J8: :H: :	A A: : :s   B=B&B#	&B7	c                   \         P                  ! R 4      p\        V4      pV P                  V^ ,          P                  R4       V P                  \        R4      ;_uu_ 4        \        V4       RRR4       R#   + '       g   i     R# ; i)   Nr{   &at position 1, opcode b'\\xff' unknownNr}   rf   s   &  r   test_unknown_opcodeGenopsTests.test_unknown_opcode   sg    )Bxav.##J9; ;H; ; ; ;r   c                0   \        R 4      p\        P                  ! V4      p\        V4      pV P	                  V^ ,          P
                  R4       V P                  \        R4      ;_uu_ 4        \        V4       RRR4       R#   + '       g   i     R# ; i)r   r{   z.at position <unknown>, opcode b'\\xff' unknownN)r@   r	   rd   r~   r    re   r   r   rr   s   &   r   test_unknown_opcode_without_pos+GenopsTests.test_unknown_opcode_without_pos   sw    ""Bxav.##JAC CHC C C Cs   .BB	r4   N)r5   r6   r7   r8   ri   rt   rw   r   r   r   r   r;   r<   r=   s   @r   rR   rR   U   s-     	.
 r   rR   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#V t$R# )!DisTestsNc                    \         P                  ! 4       p\        P                  ! V3R V/VB  V P	                  VP                  4       V4       R# outN)rp   StringIOr	   disr    getvalue)r   r&   expectedr   r   s   &&&, r   	check_disDisTests.check_dis   s9    kkm0#002r   c                   \         P                  ! 4       pV P                  \        V4      ;_uu_ 4        \        P
                  ! V3R V/VB  RRR4       V P                  VP                  4       V4       R#   + '       g   i     L2; ir   )rp   r   r   r   r	   r   r    r   )r   r&   r   expected_errorr   r   s   &&&&, r   check_dis_errorDisTests.check_dis_error   s\    kkm##J??OOD4c4V4 @2 @?s   A88B	c                *    V P                  R R4       R# )   (N(tl.z    0: (    MARK
    1: N        NONE
    2: (        MARK
    3: t            TUPLE      (MARK at 2)
    4: l        LIST       (MARK at 0)
    5: .    STOP
highest protocol among opcodes = 0
Nr   r   s   &r   	test_markDisTests.test_mark       y # 	r   c                .    V P                  R R^R7       R# )r   z    0: (    MARK
    1: N      NONE
    2: (      MARK
    3: t        TUPLE      (MARK at 2)
    4: l      LIST       (MARK at 0)
    5: .    STOP
highest protocol among opcodes = 0
)indentlevelNr   r   s   &r   test_indentlevelDisTests.test_indentlevel   s    y #  	 	r   c                <    V P                  \        R 4      R4       R# )r   z(    MARK
N        NONE
(        MARK
t            TUPLE      (MARK at unknown opcode offset)
l        LIST       (MARK at unknown opcode offset)
.    STOP
highest protocol among opcodes = 0
N)r   r@   r   s   &r   test_mark_without_posDisTests.test_mark_without_pos   s    |I. 1 	r   c                ,    V P                  R RR4       R# )s   Nt.z#    0: N    NONE
    1: t    TUPLE
zno MARK exists on stackNr   r   s   &r   test_no_markDisTests.test_no_mark   s    V & 	 r   c                *    V P                  R R4       R# )s   Np0
qr   .z    0: N    NONE
    1: p    PUT        0
    4: q    BINPUT     1
    6: r    LONG_BINPUT 2
   11: \x94 MEMOIZE    (as 3)
   12: .    STOP
highest protocol among opcodes = 4
Nr   r   s   &r   test_putDisTests.test_put   s    : = 	r   c                *    V P                  R R4       R# )s   Np1
p1
qr   .z    0: N    NONE
    1: p    PUT        1
    4: p    PUT        1
    7: q    BINPUT     1
    9: r    LONG_BINPUT 1
   14: \x94 MEMOIZE    (as 1)
   15: .    STOP
highest protocol among opcodes = 4
Nr   r   s   &r   test_put_redefinedDisTests.test_put_redefined   s    > 	A 		r   c                ,    V P                  R RR4       R# )s   p0
z    0: p    PUT        0
z'stack is empty -- can't store into memoNr   r   s   &r   test_put_empty_stackDisTests.test_put_empty_stack   s    W '.	0r   c                ,    V P                  R RR4       R# )s   (p0
z.    0: (    MARK
    1: p        PUT        0
z"can't store markobject in the memoNr   r   s   &r   test_put_markobjectDisTests.test_put_markobject   s    X ( *	+r   c                *    V P                  R R4       R# )s   (Np1
g1
hj   t.z    0: (    MARK
    1: N        NONE
    2: p        PUT        1
    5: g        GET        1
    8: h        BINGET     1
   10: j        LONG_BINGET 1
   15: t        TUPLE      (MARK at 0)
   16: .    STOP
highest protocol among opcodes = 1
Nr   r   s   &r   test_getDisTests.test_get   s    < 
? 
	r   c                x    V P                  R RR4       V P                  RRR4       V P                  RRR4       R# )   g1
.z    0: g    GET        1
z%memo key 1 has never been stored intos   h.z    0: h    BINGET     1
s   j   .z    0: j    LONG_BINGET 1
Nr   r   s   &r   test_get_without_putDisTests.test_get_without_put  sO    X (,	. 	Y ),	. 	2 5,	.r   c                Z    / pV P                  R RVR7       V P                  RRVR7       R# )s   Np1
.z^    0: N    NONE
    1: p    PUT        1
    4: .    STOP
highest protocol among opcodes = 0
)memor   zM    0: g    GET        1
    3: .    STOP
highest protocol among opcodes = 0
Nr   )r   r   s   & r   	test_memoDisTests.test_memo  sC    y #
  	 	 	x " 	 	 	r   c                *    V P                  R R4       R# )s   (N00N.z    0: (    MARK
    1: N        NONE
    2: 0        POP
    3: 0        POP        (MARK at 0)
    4: N    NONE
    5: .    STOP
highest protocol among opcodes = 0
Nr   r   s   &r   test_mark_popDisTests.test_mark_pop  r   r   c                R    V P                  R RR4       V P                  RRR4       R# )   az    0: a    APPEND
z1tries to pop 2 items from stack with only 0 itemss   ]az*    0: ]    EMPTY_LIST
    1: a    APPEND
z1tries to pop 2 items from stack with only 1 itemsNr   r   s   &r   test_too_small_stackDisTests.test_too_small_stack'  s6    T $8	: 	U % 9	:r   c                ,    V P                  R RR4       R# )rz       0: N    NONE
r|   Nr   r   s   &r   r   DisTests.test_no_stop0  s    T $*	,r   c                R    V P                  R RR4       V P                  RRR4       R# )s   NI123r   r   s   NJ4r   Nr   r   s   &r   r   DisTests.test_truncated_data5  s4    X (4	6 	] --	/r   c                ,    V P                  R RR4       R# )r   r   r   Nr   r   s   &r   r   DisTests.test_unknown_opcode=  s    X (.	0r   c                ,    V P                  R RR4       R# )s   ]N.z\    0: ]    EMPTY_LIST
    1: N    NONE
    2: .    STOP
highest protocol among opcodes = 1
z$stack not empty after STOP: \[list\]Nr   r   s   &r   test_stop_not_empty_stack"DisTests.test_stop_not_empty_stackB  s    V &
 -	.r   c                ~    V P                  R R^R7       V P                  R R^R7       V P                  RR^R7       R# )s   (Nt.a,      0: (    MARK Push markobject onto the stack.
    1: N        NONE Push None on the stack.
    2: t        TUPLE      (MARK at 0) Build a tuple out of the topmost stack slice, after markobject.
    3: .    STOP                       Stop the unpickling machine.
highest protocol among opcodes = 0
)annotatea>      0: (    MARK            Push markobject onto the stack.
    1: N        NONE        Push None on the stack.
    2: t        TUPLE      (MARK at 0) Build a tuple out of the topmost stack slice, after markobject.
    3: .    STOP                       Stop the unpickling machine.
highest protocol among opcodes = 0
s   (((((((ttttttt.a      0: (    MARK            Push markobject onto the stack.
    1: (        MARK        Push markobject onto the stack.
    2: (            MARK    Push markobject onto the stack.
    3: (                MARK Push markobject onto the stack.
    4: (                    MARK Push markobject onto the stack.
    5: (                        MARK Push markobject onto the stack.
    6: (                            MARK Push markobject onto the stack.
    7: t                                TUPLE      (MARK at 6) Build a tuple out of the topmost stack slice, after markobject.
    8: t                            TUPLE      (MARK at 5) Build a tuple out of the topmost stack slice, after markobject.
    9: t                        TUPLE      (MARK at 4) Build a tuple out of the topmost stack slice, after markobject.
   10: t                    TUPLE      (MARK at 3)     Build a tuple out of the topmost stack slice, after markobject.
   11: t                TUPLE      (MARK at 2)         Build a tuple out of the topmost stack slice, after markobject.
   12: t            TUPLE      (MARK at 1)             Build a tuple out of the topmost stack slice, after markobject.
   13: t        TUPLE      (MARK at 0)                 Build a tuple out of the topmost stack slice, after markobject.
   14: .    STOP                                       Stop the unpickling machine.
highest protocol among opcodes = 0
Nr   r   s   &r   test_annotateDisTests.test_annotateJ  s^    w !  	 	 	w !  	 	 	) ," # 	 	r   c                r    V P                  R R4       V P                  RR4       V P                  RR4       R# )s   S'abc'
.zQ    0: S    STRING     'abc'
    7: .    STOP
highest protocol among opcodes = 0
s   S"abc"
.s   S'õ'
.zV    0: S    STRING     '\xc3\xb5'
    6: .    STOP
highest protocol among opcodes = 0
Nr   r   s   &r   test_stringDisTests.test_stringl  s@    | & 	
 	| & 	
 	( + 	r   c                    V P                  R RR4       V P                  RRR4       V P                  RRR4       V P                  RRR4       V P                  R	RR
4       V P                  RRR4       R# )s   Sabc'
. zno string quotes around b"abc'"s   Sabc"
.zno string quotes around b'abc"'s   S'abc
.z3strinq quote b"'" not found at both ends of b"'abc"s   S"abc
.z3strinq quote b'"' not found at both ends of b'"abc's   S'abc"
.z6strinq quote b"'" not found at both ends of b'\\'abc"'s   S"abc'
.z6strinq quote b'"' not found at both ends of b'"abc\\''Nr   r   s   &r   test_string_without_quotes#DisTests.test_string_without_quotes}  s    ["?	A["?	A["V	X["W	Y]BZ	\]BZ	\r   c                N    V P                  R R4       V P                  RR4       R# )s	   T   abc.zQ    0: T    BINSTRING  'abc'
    8: .    STOP
highest protocol among opcodes = 1
s   T   õ.zV    0: T    BINSTRING  '\xc3\xb5'
    7: .    STOP
highest protocol among opcodes = 1
Nr   r   s   &r   test_binstringDisTests.test_binstring  s,    / 2 	
 	4 7 	r   c                N    V P                  R R4       V P                  RR4       R# )s   Uabc.zV    0: U    SHORT_BINSTRING 'abc'
    5: .    STOP
highest protocol among opcodes = 1
s   Uõ.z[    0: U    SHORT_BINSTRING '\xc3\xb5'
    4: .    STOP
highest protocol among opcodes = 1
Nr   r   s   &r   test_short_binstringDisTests.test_short_binstring  s+    | & 	
 	( + 	r   c                N    V P                  R R4       V P                  RR4       R# )s   cmodule
name
.zY    0: c    GLOBAL     'module name'
   13: .    STOP
highest protocol among opcodes = 0
s   cmödule
näme
.u[       0: c    GLOBAL     'mödule näme'
   15: .    STOP
highest protocol among opcodes = 0
Nr   r   s   &r   test_globalDisTests.test_global  s,    * - 	
 	8 ; 	r   c                *    V P                  R R4       R# )s   (imodule
name
.zz    0: (    MARK
    1: i        INST       'module name' (MARK at 0)
   14: .    STOP
highest protocol among opcodes = 0
Nr   r   s   &r   	test_instDisTests.test_inst  s    + . 	r   c                *    V P                  R R4       R# )s   Pabc
.zQ    0: P    PERSID     'abc'
    5: .    STOP
highest protocol among opcodes = 0
Nr   r   s   &r   test_persidDisTests.test_persid  s    z $ 	r   c                *    V P                  R R4       R# )s   (NI00
I01
t.z    0: (    MARK
    1: N        NONE
    2: I        INT        False
    6: I        INT        True
   10: \x89     NEWFALSE
   11: \x88     NEWTRUE
   12: t        TUPLE      (MARK at 0)
   13: .    STOP
highest protocol among opcodes = 2
Nr   r   s   &r   test_constantsDisTests.test_constants  s    0 
3 
	r   c                *    V P                  R R4       R# )s&   (I0
I1
I10
I011
L12
L13L
L014
L015L
t.aZ      0: (    MARK
    1: I        INT        0
    4: I        INT        1
    7: I        INT        10
   11: I        INT        11
   16: L        LONG       12
   20: L        LONG       13
   25: L        LONG       14
   30: L        LONG       15
   36: t        TUPLE      (MARK at 0)
   37: .    STOP
highest protocol among opcodes = 0
Nr   r   s   &r   test_integersDisTests.test_integers  s    H K 	r   c                    V P                  R RR4       V P                  RRR4       V P                  RRR4       V P                  RRR4       V P                  RRR4       V P                  RRR4       R# )	s   I0b10
.r   zinvalid literal for ints   I0o10
.s   I0x10
.s   L0b10L
.s   L0o10L
.s   L0x10L
.Nr   r   s   &r   test_nondecimal_integers!DisTests.test_nondecimal_integers  st    [".GH[".GH[".GH\2/HI\2/HI\2/HIr   r4   )%r5   r6   r7   r8   maxDiffr   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;   r<   r=   s   @r   r   r      s     G3
3			 	
0
+	.	:,
/0
. D"\


 J Jr   r   c                   &   a  ] tR tRt o R tRtV tR# )MiscTestCasei  c                   0 R kRkRkRkRkRkRkRkRkR	kR
kRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkR kR!kR"kR#kR$kR%kR&kR'kR(kR)kR*kR+kR,kR-kR.kR/kR0kR1kR2kR3kR4kR5kR6kR7kR8kR9kR:kR;kR<kR=kR>kR?kR@kRAkRBkRCkRDkREkRFkRGkRHkRIkRJkRKkRLkRMkRNkp\         P                  ! V \        VRO7       RP# )Qbytes_typesUP_TO_NEWLINETAKEN_FROM_ARGUMENT1TAKEN_FROM_ARGUMENT4TAKEN_FROM_ARGUMENT4UTAKEN_FROM_ARGUMENT8UArgumentDescriptor
read_uint1
read_uint2	read_int4
read_uint4
read_uint8read_stringnlread_stringnl_noescaperead_stringnl_noescape_pairread_string1read_string4read_bytes1read_bytes4read_bytes8read_bytearray8read_unicodestringnlread_unicodestring1read_unicodestring4read_unicodestring8read_decimalnl_shortread_decimalnl_longread_floatnlread_float8
read_long1
read_long4uint1uint2int4uint4uint8stringnlstringnl_noescapestringnl_noescape_pairstring1string4bytes1bytes4bytes8
bytearray8unicodestringnlunicodestring1unicodestring4unicodestring8decimalnl_shortdecimalnl_longfloatnlfloat8long1long4StackObjectpyintpylongpyinteger_or_boolpyboolpyfloatpybytes_or_strpystringpybytespybytearray	pyunicodepynonepytuplepylistpydictpysetpyfrozensetpybuffer	anyobject
markobject
stackslice
OpcodeInfoopcodescode2op)not_exportedN)r   check__all__r	   )r   rP  s   & r   test__all__MiscTestCase.test__all__  s:   


3
 #
 %<
 $	
 &:	

 

 '

 )4

 6B
 
 *
 ,D
 *
 ,:
 
 *
 ,9
 
 -
 /E
 "
 $9
 "
 $:
 "
 $2
 4A
 
 '
 
 
 %
 '.
 07
 9C
  
 ":
 <E
  !
   !
  "*!
  ,4!
  6B!
" #
"  0#
" 2B#
$ %
$ 0%
$ 2B%
& '
&  '
& ")'
& +2'
( )
* +
* +
*  3+
* 5=+
* ?H+
, -
, )-
, +4-
, 6C-
. /
. "/
. $-/
. /7/
. 9A/
0 1
0 #1
0 %/1
0 1<1
2 3
2 '3
2 )53
2 7@3
4 5
8 	T;\Jr   r4   N)r5   r6   r7   r8   rR  r;   r<   r=   s   @r   r   r     s     K Kr   r   c                 X    VP                  \        P                  ! \        4      4       V# r   )addTestdoctestDocTestSuiter	   )loadertestspatterns   &&&r   
load_testsr[    s    	MM'&&{34Lr   __main__)rp   r   r	   testr   test.pickletesterr   rV  unittestTestCaser   r@   rR   r   r   r[  r5   mainr4   r   r   <module>rb     s    	    1  62.0A0A 62r &G(## GTBJx   BJJ
K8$$ KB
 zMMO r   