python (3.12.0)
͑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-diffContents of file go here.
wutf-8encodingza+zAn extra line.
)
r TESTFNname name_same name_diffopenwritetempfile
gettempdirdir)selfdatar outputs E/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/test/test_filecmp.pysetUpzFileCompareTestCase.setUp s $$ "))G3"))G3,YY? #DdC'2
#fT"
#
# # $..$
9 -VLL+, -&&(
#
# - -s <C$0C0$C- 0C9c t j | j t j | j t j | j y N)osunlinkr 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 failsFshallowz&Comparing file to identical file fails)
assertTruefilecmpcmpr r r s r
test_matchingz!FileCompareTestCase.test_matching s DIItyy98 :DIItyy%H8 :DIIt~~>@ BDIIt~~uM@ 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&