File: //opt/alt/python312/lib64/python3.12/test/__pycache__/test_tabnanny.cpython-312.pyc
�
�h�e�7 � � � d Z ddlmZmZ ddlZddlZddlZddlZddlZddl Z ddl
mZmZm
Z
mZ ddlmZ dddd d
dd�Z G d
� d� Z G d� de� Z G d� de� Z G d� de� Z G d� de� Z G d� de� Z G d� de� Zy)zfTesting `tabnanny` module.
Glossary:
* errored : Whitespace related problems present in file.
� )�TestCase�mockN)�captured_stderr�captured_stdout�
script_helper�findfile)�unlinkzCfruits = [
"Apple",
"Orange",
"Banana",
print(fruits)
zLif True:
print("hello")
print("world")
else:
print("else called")
zIif True:
print("hello")
print("world")
else:
print("else called")
zNif True:
print("hello")
print("world")
else:
print("else called")
zGdef my_func():
print("hello world")
if True:
print("If called")zLdef my_func():
print("Hello world")
if True:
print("If called"))�incomplete_expression�wrong_indented�nannynag_errored�
error_free�tab_space_errored_1�tab_space_errored_2c �$ � e Zd ZdZdd�Zd� Zd� Zy)�TemporaryPyFilez+Create a temporary python source code file.Nc � � || _ || _ y �N)�source_code�dir)�selfr � directorys �9/opt/alt/python312/lib64/python3.12/test/test_tabnanny.py�__init__zTemporaryPyFile.__init__B s � �&������ c �� � t j d| j dd�� 5 }|j | j � d d d � j
| _ | j S # 1 sw Y �&xY w)N�wz.pyF)�moder �suffix�delete)�tempfile�NamedTemporaryFiler �writer �name� file_path)r �fs r � __enter__zTemporaryPyFile.__enter__F s^ � �
�
(�
(��$�(�(�5��
� &�
�
�G�G�D�$�$�%� &� ������~�~�� &� &�s �A%�%A.c �. � t | j � y r )r r$ )r �exc_type� exc_value�
exc_tracebacks r �__exit__zTemporaryPyFile.__exit__N s � ��t�~�~�r )� N)�__name__�
__module__�__qualname__�__doc__r r&