File: //opt/alt/python312/lib64/python3.12/test/__pycache__/test_filecmp.cpython-312.opt-1.pyc
�
�h�eN) � �� � d dl Z d dlZd dlZd dlZd dlZd dlmZ d dlmZ G d� dej � Z
G d� dej � Zedk( r ej � yy) � N)�support)� os_helperc �* � e Zd Zd� Zd� Zd� Zd� Zd� Zy)�FileCompareTestCasec � � t j | _ t j dz | _ t j dz | _ d}| j | j | j fD ]* }t |dd�� 5 }|j
|� d d d � �, t | j dd�� 5 }|j
d� d d d � t j � | _ y # 1 sw Y ��xY w# 1 sw Y �/xY w) Nz-samez-diff�Contents of file go here.
�w�utf-8��encodingza+zAn extra line.
)
r �TESTFN�name� name_same� name_diff�open�write�tempfile�
gettempdir�dir)�self�datar �outputs �8/opt/alt/python312/lib64/python3.12/test/test_filecmp.py�setUpzFileCompareTestCase.setUp s� � ��$�$�� �"�)�)�G�3���"�)�)�G�3���,���Y�Y�������?� #�D��d�C�'�2�
#�f����T�"�
#�
#� #� �$�.�.�$��
9� -�V��L�L�+�,� -��&�&�(���
#�
#�� -� -�s �<C$�0C0�$C- �0C9c � � t j | j � t j | j � t j | j � y �N)�os�unlinkr r r �r s r �tearDownzFileCompareTestCase.tearDown s2 � �
� � �$�)�)��
� � �$�.�.�!�
� � �$�.�.�!� c �� � | j t j | j | j � d� | j t j | j | j d�� d� | j t j | j | j � d� | j t j | j | j d�� d� y )NzComparing file to itself failsF��shallowz&Comparing file to identical file fails)�
assertTrue�filecmp�cmpr r r s r �
test_matchingz!FileCompareTestCase.test_matching s� � �������D�I�I�t�y�y�9�8� :�������D�I�I�t�y�y�%�H�8� :�������D�I�I�t�~�~�>�@� B�������D�I�I�t�~�~�u�M�@� Br! c �� � | j t j | j | j � d� | j t j | j | j
� d� y )Nz!Mismatched files compare as equalz#File and directory compare as equal)�assertFalser&