
    <eo                     Z    	 d dl Z d dlZd dlZ e            Z G d de j                  ZdS )    Nc                   *    e Zd Z	 d ZefdZefdZdS )BytecodeTestCasec                 |    t          j                    }t          j        ||           |                                S )N)file)ioStringIOdisgetvalue)selfcoss      3/usr/lib/python3.11/test/support/bytecode_helper.pyget_disassembly_as_stringz*BytecodeTestCase.get_disassembly_as_string   s0    KMMzz||    c                    	 t          j        |          D ]%}|j        |k    r|t          u s|j        |k    r|c S &|                     |          }|t          u r|d|}n
d}||||fz  }|                     |           d S )Nz not found in bytecode:
z!(%s,%r) not found in bytecode:
%s)r	   get_instructionsopname_UNSPECIFIEDargvalr   failr   xr   r   instrdisassemblymsgs          r   assertInBytecodez!BytecodeTestCase.assertInBytecode   s    O)!,, 	! 	!E|v%%\))U\V-C-C LLL44Q77\!!5;VV[[ICC6C55C		#r   c                    	 t          j        |          D ]r}|j        |k    re|                     |          }|t          u r|d|}|                     |           H|j        |k    rd}||||fz  }|                     |           sd S )Nz occurs in bytecode:
z(%s,%r) occurs in bytecode:
%s)r	   r   r   r   r   r   r   r   s          r   assertNotInBytecodez$BytecodeTestCase.assertNotInBytecode   s    6)!,, 		# 		#E|v%%"<<Q??\)):@&&++NCIIcNNNN\V++;C ==CIIcNNN		# 		#r   N)__name__
__module____qualname__r   r   r   r    r   r   r   r   	   sY        ;  
 2>     5A # # # # # #r   r   )unittestr	   r   objectr   TestCaser   r"   r   r   <module>r&      se    M  



 				vxx!# !# !# !# !#x( !# !# !# !# !#r   