bg]jddlZddlmZddlmZmZddlmZddlmZddl m Z ddl m Z ddl mZmZmZdd lmZmZdd lmZdd lmZmZmZmZmZmZdd lmZdd lm Z m!Z!ddl"m#Z#edZ$dZ%e&ej'j(Z)e*Z+eZ,GddZ-e+e+ddefdZ.Gdde*Z/Gdde/e#Z0Gdde/Z1Gdde*Z2GddeZ3Gdde3Z4Gd d!e*Z5Gd"d#e5Z6Gd$d%e/Z7dS)&N)ABC)datedatetime)Decimal)partial) namedtuple) ShouldAssert) SampleClassA SampleClassBSlotted)Mockcall)compile) ComparisonReplacer ShouldRaisecompare generator singleton) PY_37_PLUS)compare_sequencecompare_object)TestCasez0x[0-9A-Fa-f]+c8td|S)Nz...)hexaddrsub)raws p/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/testfixtures/tests/test_compare.pyhexsubrs ;;uc " ""ceZdZdZdZdS)Lazyc||_dSNmessage)selfr&s r__init__z Lazy.__init__)s  r c|jSr$r%r's r__str__z Lazy.__str__,s |r N)__name__ __module__ __qualname__r(r+r rr"r"'s2r r"c g}||fD] }|tur||! ||i|td#t$r}t |tst |jd} |t| |d| |ksJn4|| st| d|j Yd}~dSYd}~dSd}~wwxYw)NzNo exception raised!rT)expectedshow_whitespacez did not match ) markerappendAssertionError Exception isinstancerargs_comparematchpattern) x_y_r&regexrkwr8valueeactuals r check_raisesrC0sC DR    KK   53444    !^,,  q ""   Vgt D D D DW$$$$$;;v&& $-3VVU]]C      %$$$$$ sA C A;CCceZdZdZdS) CompareHelperct|i|dSr$rC)r'r8r?s rrCzCompareHelper.check_raisesKsd!b!!!!!r N)r,r-r.rCr/r rrErEIs#"""""r rEcheZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$d#Z%d$Z&d%Z'd&Z(d'Z)d(Z*d)Z+d*Z,d+Z-d,Z.d-Z/d.Z0d/Z1d0Z2d1Z3d2Z4d3Z5d4Z6d5Z7d6Z8d7Z9d8Z:d9Z;d:Zd=Z?d>Z@d?ZAd@ZBdAZCdBZDdCZEdDZFdEZGdFZHdGZIdHZJdIZKdJZLdKZMdLZNdMZOdNZPdOZQdPZRdQZSdRZTdSZUdTZVdUZWdVZXdWZYdXZZdYZ[dZZ\d[Z]d\Z^d]Z_d^Z`d_Zad`ZbdaZcdbZddcZeddZfdeZgdfZhdgZidhZjdiZkdjZldkZmdlZndmZodnZpdoZqdpZrdqZsdrZtdsZudtZvduZwdvZxdwZydxZzdyZ{dzZ|d{Z}d|Z~d}Zd~ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZGddeZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdS) TestComparecBt}t||dSr$objectr)r'os rtest_object_samezTestCompare.test_object_sameQs HH1 r cd|ttddS)Nz0 != )rCrLr*s rtest_object_diffzTestCompare.test_object_diffUs4  HHfhh >     r c4|ddddS)Nxz'x' != 1rGr*s rtest_different_typesz TestCompare.test_different_types[s  #q*-----r c&tdddSNrSrr*s rtest_number_samezTestCompare.test_number_same^s1 r c4|ddddS)NrSz1 != 2rGr*s rtest_number_differentz!TestCompare.test_number_differentas  !Q)))))r ch|tdtdddS)NrSrZzDecimal('1') != Decimal('2')rCrr*s rtest_decimal_differentz"TestCompare.test_decimal_differentds7 '!**gajj8 : : : : :r c:|ddddddS)NrSrZz1 (expected) != 2 (actual)r1rBx_labely_labelrGr*s rtest_different_with_labelsz&TestCompare.test_different_with_labelshs: !Q <",h  @ @ @ @ @r c&tdddS)NrRrWr*s rtest_string_samezTestCompare.test_string_samelsSr c4|ddddS)Nabz 'a' != b'b'rGr*s rtest_unicode_string_differentz)TestCompare.test_unicode_string_differentos  #t]33333r c8d}|dd|dS)Nz! b'12345678901' != b'12345678902's 12345678901s 12345678902rGr'r1s rtest_bytes_differentz TestCompare.test_bytes_differentrs9           r c*tddddS)Nr T)rBr1strictrWr*s rtest_bytes_same_strictz"TestCompare.test_bytes_same_strictssS666666r c6|ddddS)Ns{"byte_pound":"b'\\xa3'"}s{"byte_pound":"b\'\xa3'"}zY b'{"byte_pound":"b\\\'\\xa3\'"}' (expected) != b'{"byte_pound":"b\'\\\\xa3\'"}' (actual))rBr1r&rGr*s rtest_moar_bytes_differentz%TestCompare.test_moar_bytes_differents5 35H  r c4|ddddS)N xxxxxxxxx yyyyyyyyyz'\nxxxxxxxxx' != '\nyyyyyyyyy'rGr*s rtest_string_diff_shortz"TestCompare.test_string_diff_shorts,  , .     r c4|ddddS)N xxxxxxxxxxx yyyyyyyyyyyz 'xxxxxxxxxxx' != 'yyyyyyyyyyy'rGr*s rtest_string_diff_longz!TestCompare.test_string_diff_longs,  F 0     r c4|ddddS)N xxxxx yyyyy xxxxx zzzzzz: --- first +++ second @@ -1,2 +1,2 @@ xxxxx -yyyyy +zzzzzrGr*s rtest_string_diff_long_newlinesz*TestCompare.test_string_diff_long_newliness-  . N     r c:|ddddddS)Nrsrtz2'\nxxxxxxxxx' (expected) != '\nyyyyyyyyy' (actual)r1rBr`rGr*s rtest_string_diff_short_labelsz)TestCompare.test_string_diff_short_labelss7  , B      r c:|ddddddS)Nrwrxz3 'xxxxxxxxxxx' (expected) != 'yyyyyyyyyyy' (actual)r1rBr`rGr*s rtest_string_diff_long_labelsz(TestCompare.test_string_diff_long_labelss7  F D      r c:|ddddddSNr{r|z= --- expected +++ actual @@ -1,2 +1,2 @@ xxxxx -yyyyy +zzzzzr1rBr`rGr*s r%test_string_diff_long_newlines_labelsz1TestCompare.test_string_diff_long_newlines_labels:  . 6      r cDtd}t||dSN some message ValueErrorr)r'rAs rtest_exception_same_objectz&TestCompare.test_exception_same_objects ~ & &1 r c|td}td}tt||dSrrrCr'e1e2s rtest_exception_same_c_wrapperz)TestCompare.test_exception_same_c_wrapper8  ' '  ' '"rr cbtd}td}t||dSrrrs rtest_exception_different_objectz+TestCompare.test_exception_different_objects-  ' '  ' 'Br c|td}td}tt||dSrrrs r)test_exception_different_object_c_wrapperz5TestCompare.test_exception_different_object_c_wrapperrr ctd}td}tr|||ddS|||ddS)Nrsome other messagez>ValueError('some message') != ValueError('some other message')z@ValueError('some message',) != ValueError('some other message',))rrrCrs rtest_exception_diffzTestCompare.test_exception_diffs{  ' ' , - -     BP        BR     r ctd}td}|t||dtrdnddS)Nrrz attributes differ: 'args': ('some message',) (Comparison) != ('some other message',) (actual) != ValueError('some other message'{message}),r%)rrCrformatrrs rtest_exception_diff_c_wrapperz)TestCompare.test_exception_diff_c_wrappersi  ' ' , - -  bEE2=vJ7bbCv88 : : : : :r c<|gdgdddS)N)quite a long string 1quite a long string 2quite a long string 3quite a long string 4zquite a long string 5zquite a long string 6zquite a long string 7zquite a long string 8)rrrrzquite a long string 9zquite a long string 10zquite a long string 11zquite a long string 12asequence not as expected: same: ['quite a long string 1', 'quite a long string 2', 'quite a long string 3', 'quite a long string 4'] first: ['quite a long string 5', 'quite a long string 6', 'quite a long string 7', 'quite a long string 8'] second: ['quite a long string 9', 'quite a long string 10', 'quite a long string 11', 'quite a long string 12'] While comparing [4]: 'quite a long string 5' != 'quite a long string 9'rGr*s rtest_sequence_longzTestCompare.test_sequence_longsJ  ? ? ? A A A &     r cB|gdgdddddS)NrSrZrSrZzCsequence not as expected: same: [1, 2] expected: [3] actual: [4]r1rBr`rGr*s r'test_sequence_different_labels_suppliedz3TestCompare.test_sequence_different_labels_supplied sC  IIyyy       r c.tgdgddSNrrWr*s rtest_list_samezTestCompare.test_list_sames  999%%%%%r c<|gdgdddS)Nrr@sequence not as expected: same: [1, 2] first: [3] second: [4]rGr*s rtest_list_differentzTestCompare.test_list_differents6  IIyyy      r c<|gdgdddS)N)rSrZg@)rSrZg@zDsequence not as expected: same: [1, 2] first: [3.0] second: [4.0]rGr*s rtest_list_different_floatz%TestCompare.test_list_different_float&s6  KK      r ct|ddtdgddtdgddS)NrSrZrrzVsequence not as expected: same: [1, 2] first: [Decimal('3')] second: [Decimal('4')]r]r*s rtest_list_different_decimalz'TestCompare.test_list_different_decimal2sH  71:: Awqzz 2      r c8|dgdgddS)NrSrZs2  C!      r c<|ddggdddS)NrSrZrz?sequence not as expected: same: [1, 2] first: [] second: [3]rGr*s rtest_list_first_shorterz#TestCompare.test_list_first_shorterJs6  FIII      r c<|gdddgddS)NrrSrZz?sequence not as expected: same: [1, 2] first: [3] second: []rGr*s rtest_list_second_shorterz$TestCompare.test_list_second_shorterSs6  II1v      r c^ttdtddS)NrSrRrdictr*s rtest_dict_samezTestCompare.test_dict_same\s(q 4!999%%%%%r ch|ttdddS)Nrzz6dict not as expected: in second but not first: 'z': 3rCrr*s rtest_dict_first_missing_keysz(TestCompare.test_dict_first_missing_keys_s:  FFD1III      r ch|tdtddS)Nrrz6dict not as expected: in first but not second: 'z': 3rr*s rtest_dict_second_missing_keysz)TestCompare.test_dict_second_missing_keyshs:  1IIItvv      r cl|tdtdddS)NrSrrZz1dict not as expected: values differ: 'x': 1 != 2rr*s rtest_dict_values_differentz&TestCompare.test_dict_values_differentqs>  1IIItayyy      r cp|tddtddddS)NrSrRyrZz=dict not as expected: values differ: 'x': 1 != 2 'y': 1 != 2rr*s r%test_dict_identical_non_matching_intsz1TestCompare.test_dict_identical_non_matching_intszsB  1NNND1NNN      r cp|tddtddddS)Ng?rg@zEdict not as expected: values differ: 'x': 1.0 != 2.0 'y': 1.0 != 2.0rr*s r'test_dict_identical_non_matching_floatsz3TestCompare.test_dict_identical_non_matching_floatssH  3#   sc 2 2 2      r c@|ddddddddS)N)foobazrSzdict not as expected: values differ: 'baz': None != 1 'foo': None != 1 While comparing ['baz']: None != 1 While comparing ['foo']: None != 1rGr*s r0test_dict_identical_none_matching_nones_and_oneszsequence not as expected: same: () first: (1,) second: (2,)rGr*s rtest_tuple_totally_differentz(TestCompare.test_tuple_totally_differentcs.  5      r c4|ddddS)Nrr@sequence not as expected: same: (1, 2) first: () second: (3,)rGr*s rtest_tuple_first_shorterz$TestCompare.test_tuple_first_shorterls.  I      r c4|ddddS)Nrr@sequence not as expected: same: (1, 2) first: (3,) second: ()rGr*s rtest_tuple_second_shorterz%TestCompare.test_tuple_second_shorterus.  v      r cbttdddtddddS)NrSrZrrrr*s rtest_generator_samezTestCompare.test_generator_same~s0 !Q""IaA$6$677777r cp|tdddtdddddS)NrSrZrrrrCrr*s rtest_generator_differentz$TestCompare.test_generator_differentsF  aA   !Q 2 2      r ch|tdtdddS)NrSrZr rr*s r test_generator_totally_differentz,TestCompare.test_generator_totally_differents:  aNNIaNN      r cn|tddtdddddS)NrSrZrrrr*s rtest_generator_first_shorterz(TestCompare.test_generator_first_shortersB  aOOYq!Q//      r cn|tdddtddddS)NrSrZrrrr*s rtest_generator_second_shortedz)TestCompare.test_generator_second_shortedsB  aA   !Q      r c |tddtddtddtddddS)NrSrZrrrzgsequence not as expected: same: (1, 2, ) first: (4,) second: (5,)rr*s rtest_nested_generator_differentz+TestCompare.test_nested_generator_differentsW  aIaLL! , , aIaLL! , ,      r c ttddddtddtdddS)NrSrZrrrrr*s r test_nested_generator_tuple_leftz,TestCompare.test_nested_generator_tuple_leftsF aE1 % % aIaLL! , ,     r c ttddtddtdddddS)NrSrZrrr"rr*s r!test_nested_generator_tuple_rightz-TestCompare.test_nested_generator_tuple_rightsF aIaLL! , , aE1 % %     r cDtdtddddS)NrrSrZrrr*s rtest_sequence_and_generatorz'TestCompare.test_sequence_and_generators$ 9Q1--.....r cxtd}|dtddd|ddd dS) Nz\(1, 2, 3\) \(<(class|type) 'tuple'>\) \(expected\) != \) \(actual\)rrSrZrTr1rB)r>rnrarb)rrCrrks r"test_sequence_and_generator_strictz.TestCompare.test_sequence_and_generator_stricts\ 8  yAq))      r cDttdddddS)NrSrZrrrr*s rtest_generator_and_sequencez'TestCompare.test_generator_and_sequences$ !Q""I.....r c^ttddtdddS)NrSr)rranger*s r test_iterable_with_iterable_samez,TestCompare.test_iterable_with_iterable_sames(a U1a[[)))))r cl|tddtddddS)NrSrrr)rCr-r*s r%test_iterable_with_iterable_differentz1TestCompare.test_iterable_with_iterable_differents>  !QKKq!      r c`ttddtddddS)NrSrrZr)rr-rr*s rtest_iterable_and_generatorz'TestCompare.test_iterable_and_generators,a Yq!Q//00000r ctd}|tddtddd|ddS)Nzqrange\(1, 4\) \(<(class|type) 'x?range'>\) != \)rSrrZrT)r>rn)rrCr-rrks r"test_iterable_and_generator_strictz.TestCompare.test_iterable_and_generator_stricts^ -  !QKK1a++      r c`ttdddtdddS)NrSrZrr)rrr-r*s rtest_generator_and_iterablez'TestCompare.test_generator_and_iterables, !Q""E!QKK00000r c*tdgddSrrWr*s rtest_tuple_and_listzTestCompare.test_tuple_and_lists 999%%%%%r c@d}|dgd|ddS)Nz9(1, 2, 3) () != [1, 2, 3] ()rTrnrGrks rtest_tuple_and_list_strictz&TestCompare.test_tuple_and_list_strictsA1  yyy       r ctGddt}t|d|dddS)NceZdZdS)9TestCompare.test_float_subclass_strict..TestFloatNr,r-r.r/r r TestFloatr> Dr r@g?Tr:)floatr)r'r@s rtest_float_subclass_strictz&TestCompare.test_float_subclass_strictsW         $4>>>>>>r c@Gdd}t||dS)NceZdZdS)2TestCompare.test_old_style_classes_same..XNr?r/r rXrF rAr rGrWr'rGs rtest_old_style_classes_samez'TestCompare.test_old_style_classes_same s;        1 r cld}Gdd}Gdd}||||dS)Nz.X'> != .Y'>ceZdZdS);TestCompare.test_default_style_classes_different..XNr?r/r rrGrLrAr rGceZdZdS);TestCompare.test_default_style_classes_different..YNr?r/r rYrNrAr rOrGr'r1rGrOs r$test_default_style_classes_differentz0TestCompare.test_default_style_classes_differents{ @                  !Q)))))r cLGddt}t||dS)NceZdZdS)2TestCompare.test_new_style_classes_same..XNr?r/r rrGrT!rAr rGrKrHs rtest_new_style_classes_samez'TestCompare.test_new_style_classes_same s=        1 r cd}Gddt}Gddt}||||dS)Nz.X'> != .Y'>ceZdZdS)7TestCompare.test_new_style_classes_different..XNr?r/r rrGrX.rAr rGceZdZdS)7TestCompare.test_new_style_classes_different..YNr?r/r rrOrZ1rAr rOrLrCrPs r test_new_style_classes_differentz,TestCompare.test_new_style_classes_different%s~ <                  !Q)))))r c8|dddddS)Nz x z x z' x \n\r' != ' x \n \t'Tr2rGr*s rtest_show_whitespacez TestCompare.test_show_whitespace5s4  z )       r c8|dddddS)Nz 'z zP --- first +++ second @@ -1,2 +1,2 @@ -'\t \n' -" '" +'\r \n' +' 'Tr^rGr*s rtest_show_whitespace_longz%TestCompare.test_show_whitespace_long=s8    !      r c*tddddS)NrRTr^rWr*s rtest_show_whitespace_equalz&TestCompare.test_show_whitespace_equalJsS$//////r c8|dddddS)N)rSrg)rZbzFsequence not as expected: same: () first: (1, 'a') second: (2, 'b')Fr^rGr*s r9test_show_whitespace_not_used_because_of_other_differencezETestCompare.test_show_whitespace_not_used_because_of_other_differenceMs9    "      r c4|ddddS)Nz x z x z' x \n' != ' x \n'rGr*s r test_include_trailing_whitespacez,TestCompare.test_include_trailing_whitespace^s,  X #     r c*tddddS)Nz x z x Ftrailing_whitespacerWr*s rtest_ignore_trailing_whitespacez+TestCompare.test_ignore_trailing_whitespaceds :5AAAAAAr c8|dddddS)NrSr1 != ''FrjrGr*s r*test_ignore_trailing_whitespace_non_stringz6TestCompare.test_ignore_trailing_whitespace_non_stringgs4  r  %      r c8|dddddS)Nz a b c za b c z'a\n b\n c' != 'a\nb\nc'FrjrGr*s r>test_ignore_trailing_whitespace_but_respect_leading_whitespacezJTestCompare.test_ignore_trailing_whitespace_but_respect_leading_whitespacens7    + %      r c4|ddddS)Nz z z'\n \n' != '\n 'rGr*s rtest_include_blank_linesz$TestCompare.test_include_blank_linesxs,  V "     r c*tddddS)Nz a b z a bF blanklinesrWr*s rtest_ignore_blank_linesz#TestCompare.test_ignore_blank_lines~s/ u  . . . . . .r c8|dddddS)NrSrrnFrurGr*s r"test_ignore_blank_lines_non_stringz.TestCompare.test_ignore_blank_lines_non_strings4  r       r cfd}td5tddiddidt|iddddS#1swxYwYdS)Nc|ddi|ddi|dddS)NrSrZrbar not equal) assertEqual get_option)rRrcontextr's r compare_dictz6TestCompare.test_supply_comparer..compare_dicts`   QA ' ' '   QA ' ' '   W//66 > > >;r r}rSrZr|)r comparers)r rr)r'rs` rtest_supply_comparerz TestCompare.test_supply_comparers      + & & 4 4 QFQF#\2 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4sAA Ac tdd}td5t|d|dtt d|t diddddS#1swxYwYdS) NTestrRzcompare class_rSrZz compare tuple) return_valuer)rr rtupler r'class_s rtest_register_more_specificz'TestCompare.test_register_more_specificsFC(( * + +   FF1IIvvayy4_===D.>???                      sA A77A;>A;c&Gddt}d}t5}|dtti|d|dgd|dgd||i ddddS#1swxYwYdS) NceZdZdZdZdS)ATestCompare.test_extra_comparers_leave_existing..MyObjectc||_dSr$name)r'rs rr(zJTestCompare.test_extra_comparers_leave_existing..MyObject.__init__   r cdS)NzMyObject instancer/r*s r__repr__zJTestCompare.test_extra_comparers_leave_existing..MyObject.__repr__s**r Nr,r-r.r(rr/r rMyObjectrs2 ! ! ! + + + + +r rc$|jd|jS)Nz != rrRrrs rcompare_my_objectzJTestCompare.test_extra_comparers_leave_existing..compare_my_objects!"0 0r z!testfixtures.comparison._registryrSrr|z~sequence not as expected: same: [1] first: [MyObject instance] second: [MyObject instance] While comparing [1]: foo != barr)rLrreplacelistrrC)r'rrrs r#test_extra_comparers_leave_existingz/TestCompare.test_extra_comparers_leave_existings + + + + +v + + + 1 1 1 ZZ 1 II9&<      HHUOO$q((5//&: 2$%67                       sABB  B cGddt}|dg}|dg}|||ddS)NceZdZdS).TestCompare.test_list_subclass..MyListNr?r/r rMyListrr rrSrZrrrC)r'ra_listb_lists rtest_list_subclasszTestCompare.test_list_subclasssf!!!!!d!!!  F      r cFt}t||ddSNTr:rKr'ms rtest_same_object_strict_okayz(TestCompare.test_same_object_strict_okays& HH1T""""""r ct}d|_|ttddt|idS)Nr}T)rnr)r rrCrL)r' compare_objs rtest_strict_comparer_suppliedz)TestCompare.test_strict_comparer_suppliedsUff #.    HHfhh {+      r cGddt}||d|ddddS)NceZdZdS)8TestCompare.test_strict_default_comparer..MyListNr?r/r rrrrAr rrrrTr:r)r'rs rtest_strict_default_comparerz(TestCompare.test_strict_default_comparersx     T     F9  vvi00       r ct}||tjg|jdt dddS)Nz3[call.aCall()] () != [call.aCall()] ()Tr:)r aCallrCr method_callscall_list_reprrs rtest_list_subclass_strictz%TestCompare.test_list_subclass_strictsh FF    Z\\NAN####      r ct}|d|tjdg|jdtdddS)NXXXXXXXXXXXXXXXXXXXXYYYYYYYYYYYYYYYYYYYYzY[call.call('YYYYYYYYYYYYYYYYYY... () != [call.call('XXXXXXXXXXXXXXXXXX... (rTr:)r rrCrrrs rtest_list_subclass_long_strictz*TestCompare.test_list_subclass_long_strictss FF v  Yv   # ###      r c8|dddddS)NrSrZzwrong number of orders: 1 != 2zwrong number of ordersprefixrGr*s r test_prefixzTestCompare.test_prefixs3 !Q @!9  ; ; ; ; ;r c8|dddddS)Nr{r|zHfile content: --- first +++ second @@ -1,2 +1,2 @@ xxxxx -yyyyy +zzzzzz file contentrrGr*s rtest_prefix_multilinez!TestCompare.test_prefix_multiline s7  . 6!      r c|td5tdddddddS#1swxYwYdS)N foo: 1 != 2rSrZcdS)Nrr/r/r rz2TestCompare.test_prefix_callable..sr rr rr*s rtest_prefix_callablez TestCompare.test_prefix_callables - ( ( 0 0 Aq / / / / 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 155ctd5tddtdddddS#1swxYwYdS)NrrSrZrrr rr"r*s rtest_prefix_stringablez"TestCompare.test_prefix_stringable - ( ( . . Aqe - - - - . . . . . . . . . . . . . . . . . . =AAc `tddttddS)NrZboom! side_effectrrr r6r*s rtest_prefix_lazyzTestCompare.test_prefix_lazy01Ti.@.@AAABBBBBBr c8|dddddS)NrSrZz1 != 2 additional contextzadditional contextsuffixrGr*s r test_suffixzTestCompare.test_suffixs6  q !'      r c|td5tdddddddS#1swxYwYdS)Nz1 != 2 3rSrZcdSrr/r/r rrz2TestCompare.test_suffix_callable..'sr rrr*s rtest_suffix_callablez TestCompare.test_suffix_callable%s + & & , , Aq + + + + , , , , , , , , , , , , , , , , , ,rctd5tddtdddddS#1swxYwYdS)Nz 1 != 2 foorSrZrrrr*s rtest_suffix_stringablez"TestCompare.test_suffix_stringable)rrc `tddttddS)NrZrrrrr*s rtest_suffix_lazyzTestCompare.test_suffix_lazy-rr c:|ddddddSrrGr*s rtest_labels_multilinez!TestCompare.test_labels_multiline0rr cR|tddddddS)NrSrZrz+ != Nonerr*s r!test_generator_with_non_generatorz-TestCompare.test_generator_with_non_generator9s8  aA   9     r cd}ttd5ttddd|ddddS#1swxYwYdS)Nc3,KdVtd)NrSr) TypeErrorr/r rbad_genz@TestCompare.test_generator_with_buggy_generator..bad_gen@sGGGE"" "r rrSrZr)rrrr)r'rs r#test_generator_with_buggy_generatorz/TestCompare.test_generator_with_buggy_generator?s # # # 5)) * * 3 3 IaA&& 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3s(AAAcl|tdtdddS)Nrrrzdict not as expected: values differ: 'x': (1, 2, 3) != (1, 2, 4) While comparing ['x']: sequence not as expected: same: (1, 2) first: (3,) second: (4,)rr*s r'test_nested_dict_tuple_values_differentz3TestCompare.test_nested_dict_tuple_values_differentHsD  9   ti000      r c|ttdttdddS)NrSrrrZzdict not as expected: values differ: 'x': {'y': 1} != {'y': 2} While comparing ['x']: dict not as expected: values differ: 'y': 1 != 2rr*s rtest_nested_dict_differentz&TestCompare.test_nested_dict_different\sT  4!999   tdQiii000      r ctttttddS)NrT ignore_eqrr*s rtest_nested_dict_empty_but_samez+TestCompare.test_nested_dict_empty_but_samejs5tvvtvv$??????r ctttdttdddS)NrSrTrrr*s r test_nested_dict_empty_with_keysz,TestCompare.test_nested_dict_empty_with_keysmsCtayyy!!!4$)))#4#4#4EEEEEEr cD|dgdfdgdfddS)NrS)rZrr)rZrrzsequence not as expected: same: (1,) first: ([2, 3, 5],) second: ([2, 4, 5],) While comparing [1]: sequence not as expected: same: [2] first: [3, 5] second: [4, 5]rGr*s rtest_tuple_list_differentz%TestCompare.test_tuple_list_differentps>   NQ N      r c8|dddddS)N)rSrZz foo bar baz r)rSrZz foo bob baz rzsequence not as expected: same: (1, 2) first: ('foo\nbar\nbaz\n', 4) second: ('foo\nbob\nbaz\n', 4) While comparing [2]: --- first +++ second @@ -1,4 +1,4 @@ 'foo\n' -'bar\n' +'bob\n' 'baz\n' ''Tr^rGr*s r!test_tuple_long_strings_differentz-TestCompare.test_tuple_long_strings_differents9  ( ( *!1      r cp|tddtddddS)Nr)rrrrr)rradict not as expected: values differ: 'x': (1, 2, 3) != (1, 2, 4) 'y': (4, 5, 6) != (4, 5, 7) While comparing ['x']: sequence not as expected: same: (1, 2) first: (3,) second: (4,) While comparing ['y']: sequence not as expected: same: (4, 5) first: (6,) second: (7,)rr*s rtest_dict_multiple_differencesz*TestCompare.test_dict_multiple_differencessI  9 , , , 9 , , ,      r c td}td}t||}t|}|tddd|fdgddgtddd|fdgddgd t t |t t | dS) Nobj1obj2rSrgrerrradict not as expected: same: ['y'] values differ: 'x': [1, ('a', 'b', {gen1}), 3] != [1, ('a', 'b', {gen2}), 3] While comparing ['x']: sequence not as expected: same: [1] first: [('a', 'b', {gen1}), 3] second: [('a', 'b', {gen2}), 3] While comparing ['x'][1]: sequence not as expected: same: ('a', 'b') first: ({gen1},) second: ({gen2},) While comparing ['x'][1][2]: sequence not as expected: same: (,) first: (,) second: ()gen1gen2rrrCrrrreprr'rrrrs rtest_deep_breadcrumbsz!TestCompare.test_deep_breadcrumbss    t$$    AS$'+1v 6 6 6 AS$'+1v 6 6 6'P&fT$ZZ00$T$ZZ0022W- - - - - r c td}td}t||}t|}|tddd|fdgddgtddd|fdgddgd t t |t t | d d dS)NrrrSrgrerrradict not as expected: same: ['y'] values differ: 'x': [1, ('a', 'b', {gen1}), 3] (expected) != [1, ('a', 'b', {gen2}), 3] (actual) While comparing ['x']: sequence not as expected: same: [1] expected: [('a', 'b', {gen1}), 3] actual: [('a', 'b', {gen2}), 3] While comparing ['x'][1]: sequence not as expected: same: ('a', 'b') expected: ({gen1},) actual: ({gen2},) While comparing ['x'][1][2]: sequence not as expected: same: (,) expected: (,) actual: ()rr1rBr`rrs rtest_nested_labelszTestCompare.test_nested_labelss    t$$    AS$'+1v 6 6 6 AS$'+1v 6 6 6(R&fT$ZZ00$T$ZZ0022_ 0 0 0 0 0 r c tdd}t|}tt}||dddgdgd|d|d d dS) NMyTuplex y zrSrZrrzsequence not as expected: same: [] first: [MyTuple(x=1, y=2, z=3)] second: [(1, 2, 3)] While comparing [0]: MyTuple(x=1, y=2, z=3) (z) != (1, 2, 3) (rTr:)rrrrC)r'r  type_repr tuple_reprs r'test_nested_strict_only_type_differencez3TestCompare.test_nested_strict_only_type_difference4sY00MM %[[   WQ1    KK" ::: /%      r cLd}|ddddgfdd|zddS)Nz3[1, 2] () != (1, 3) ()rSrZ)rSrZ)rSrzcsequence not as expected: same: (1, 2) first: ([1, 2],) second: ((1, 3),) While comparing [2]: Tr:rGrks rtest_strict_nested_differentz(TestCompare.test_strict_nested_differentMsQH  Aq6NN $'/ /      r cjtdd}t|d|ddS)NFoorRrS)rrrs rtest_namedtuple_equalz!TestCompare.test_namedtuple_equalas7E3''q 66!99%%%%%r c|tdd}||dd|ddddS)Nrx yrSrZrz=Foo not as expected: same: ['x'] values differ: 'y': 2 != 3rrCrs rtest_namedtuple_same_typez%TestCompare.test_namedtuple_same_typeesQE5))  F1aLL&&A,,      r ctdd}tdd}||dd|dddddS) NrrBarr rSrZrzFoo(x=1, y=2) () != Bar(x=1, y=2, z=3) ()r)r'class_aclass_bs rtest_namedtuple_different_typez*TestCompare.test_namedtuple_different_typepsdUE**UG,,  GAqMM771a++ >     r c>|dddddgddS)NonetworrSrZz{1: 'one', 2: 'two'} != [1, 2]rGr*s rtest_dict_with_listzTestCompare.test_dict_with_listzs8 % 1a& ,     r c6|ddddS)NrRrz'y' (expected) != 'x' (actual))r1r&rGr*s rtest_explicit_expectedz"TestCompare.test_explicit_expecteds5 #"B  D D D D Dr c6|ddddS)NrRr'x' (expected) != 'y' (actual))rBr&rGr*s rtest_explicit_actualz TestCompare.test_explicit_actuals5 #c"B  D D D D Dr c6|ddddS)NrRrr#r1rBr&rGr*s rtest_explicit_bothzTestCompare.test_explicit_boths5 3s"B  D D D D Dr c:|ddddddS)NrRrrarb'x' (x_label) != 'y' (y_label))rarbr&rGr*s rtest_implicit_and_labelsz$TestCompare.test_implicit_and_labelss: #s"+Y"B  D D D D Dr c:|ddddddS)NrRrrarbr))rRrrarbr&rGr*s rtest_explicit_and_labelsz$TestCompare.test_explicit_and_labelss: C3"+Y"B  D D D D Dr cttd5tdddddddS#1swxYwYdS)Nz9Exactly two objects needed, you supplied: ['z', 'x', 'y']rRrr)r1rrrr*s rtest_invalid_two_args_expectedz*TestCompare.test_invalid_two_args_expecteds K     , , Cs + + + + , , , , , , , , , , , , , , , , , ,=AActtd5tdddddddS#1swxYwYdS)N9Exactly two objects needed, you supplied: ['x', 'y', 'z']rRrr)rBr.r*s rtest_invalid_two_args_actualz(TestCompare.test_invalid_two_args_actuals K     * * CS ) ) ) ) * * * * * * * * * * * * * * * * * *r0cttd5tddddS#1swxYwYdS)Nz)Exactly two objects needed, you supplied:r.r*s rtest_invalid_zero_argsz"TestCompare.test_invalid_zero_argss ;       III                  s 9==cttd5tdddddS#1swxYwYdS)Nz/Exactly two objects needed, you supplied: ['x']rRr.r*s rtest_invalid_one_argsz!TestCompare.test_invalid_one_argss A       CLLL                  s :>>cttd5tdddddddS#1swxYwYdS)Nr2rRrrr.r*s rtest_invalid_three_argsz#TestCompare.test_invalid_three_argss K     # # Cc " " " # # # # # # # # # # # # # # # # # #<AActtd5tddddddS#1swxYwYdS)NzAExactly two objects needed, you supplied: ['x'] {'expceted': 'z'}rRr)expcetedr.r*s rtest_invalid_because_of_typoz(TestCompare.test_invalid_because_of_typos S     ' ' C# & & & & ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' 'r:cR|tdddddS)NrRrF)raisesz 'x' != 'y')r~rr*s rtest_dont_raisezTestCompare.test_dont_raises- c%888,GGGGGr c eZdZdZdZdZdS)TestCompare.OrmObjc||_dSr$rgr'rgs rr(zTestCompare.OrmObj.__init__s DFFFr cdS)NTr/r'others r__eq__zTestCompare.OrmObj.__eq__s4r c0dt|jzS)NzOrmObj: )strrgr*s rrzTestCompare.OrmObj.__repr__sc$&kk) )r N)r,r-r.r(rIrr/r rOrmObjrBsA       * * * * *r rLc"ddkfd}dddg|ddS)NrSrZc3hKdVdVdSNrSrZ)rLr*sr query_setz:TestCompare.test_django_orm_is_horrible..query_sets9++a.. ++a.. r zsequence not as expected: same: (OrmObj: 1,) expected: (OrmObj: 3,) actual: (OrmObj: 2,) While comparing [1]: OrmObj not as expected: attributes differ: 'a': 3 (expected) != 2 (actual)rTr&r1rBr) assertTruerLrC)r'rPs` rtest_django_orm_is_horriblez'TestCompare.test_django_orm_is_horribles  A$++a..8999 ! ! ! ! ! 2 kk!nndkk!nn59;;)      r c ttd}||d|d||d|d||tddd|tddddS)NTrrSzsome longish stringi)rrrLr)r' t_compares r"test_django_orm_is_horrible_part_2z.TestCompare.test_django_orm_is_horrible_part_2sGt444  $++a..$++a..111 $++344++344 6 6 6 $++d4A..//++d4A..// 1 1 1 1 1r cvt|d|dddS)NrSTr1rBr)rrLr*s r"test_django_orm_is_horrible_part_3z.TestCompare.test_django_orm_is_horrible_part_3s@[[^^;;q>>      r c:|ddgdddS)Nz[1] (expected) != 2 (actual)rSrZTrQrGr*s r"test_django_orm_is_horrible_part_4z.TestCompare.test_django_orm_is_horrible_part_4s7 2S      r c Gddt}|d||d||dddS)NceZdZdZdS)>TestCompare.test_nested_django_orm_in_object..MyObjectc||_dSr$)orm)r'r`s rr(zGTestCompare.test_nested_django_orm_in_object..MyObject.__init__ r Nr,r-r.r(r/r rrr^s#     r rzMyObject not as expected: attributes differ: 'orm': OrmObj: 1 (expected) != OrmObj: 2 (actual) While comparing .orm: OrmObj not as expected: attributes differ: 'a': 1 (expected) != 2 (actual)rSrZTrQ)rLrCrL)r'rs r test_nested_django_orm_in_objectz,TestCompare.test_nested_django_orm_in_objects     v    6Xdkk!nn--8DKKNN++      r ct}|dddt|j|jdSNrSrZrrr rr mock_callsrs rtest_mock_call_samezTestCompare.test_mock_call_sames= FF aa al+++++r ct}|dddt|j|jddSNrSrZrrTr:rfrs rtest_mock_call_same_strictz&TestCompare.test_mock_call_same_strictsB FF aa al4888888r ct}|dddt}|dddt|j|jdSrerfr'm1m2s rtest_mock_call_equalz TestCompare.test_mock_call_equals^ VV q!q VV q!q r}-----r ct}|dddt}|dddt|j|jddSrjrfrms rtest_mock_call_equal_strictz'TestCompare.test_mock_call_equal_strict!sc VV q!q VV q!q r}T::::::r ct}t}|dddd|dddd||j|jddS)NrSrZrrrrzsequence not as expected: same: [] first: [call.foo(1, 2, x=3, y=4)] second: [call.bar(1, 3, x=7, y=4)] While comparing [0]: 'call.foo(1, 2, x=3, y=4)' != 'call.bar(1, 3, x=7, y=4)')r rr|rCrgrms rtest_calls_differentz TestCompare.test_calls_different(sy VV VV q!qA q!qA  M M )     r ct}|d||jjt dddS)NrSrZz'call(1)' != 'call(2)')r rrC call_argsrrs rtest_call_args_differentz$TestCompare.test_call_args_differentBsO FF a  EO GG $     r cGddt}t}t}||d||d||j|jddS)NceZdZdZdZdS)ETestCompare.test_calls_args_different_but_same_repr..Annoyingc||_dSr$rr'rRs rr(zNTestCompare.test_calls_args_different_but_same_repr..Annoying.__init__N r cdSNz r/r*s rrzNTestCompare.test_calls_args_different_but_same_repr..Annoying.__repr__P#|r Nrr/r rAnnoyingrzM2    $ $ $ $ $r rrSraWsequence not as expected: same: [] first: [call.foo()] second: [call.foo()] While comparing [0]: mock.call not as expected: While comparing [0] args: sequence not as expected: same: () first: (,) second: (,) While comparing [0] args[0]: Annoying not as expected: attributes differ: 'x': 1 != 3)rLr rrCrgr'rrnros r'test_calls_args_different_but_same_reprz3TestCompare.test_calls_args_different_but_same_reprLs $ $ $ $ $v $ $ $ VV VV xx{{ xx{{  M M      r cGddt}t}t}||dg||dgt|j|jdS)NceZdZdZdZdS)DTestCompare.test_calls_nested_equal_sub_attributes..Annoyingc||_dSr$rr|s rr(zMTestCompare.test_calls_nested_equal_sub_attributes..Annoying.__init__zr}r cdSrr/r*s rrzMTestCompare.test_calls_nested_equal_sub_attributes..Annoying.__repr__|rr Nrr/r rrryrr rrSr)rLr rrrgrs r&test_calls_nested_equal_sub_attributesz2TestCompare.test_calls_nested_equal_sub_attributesxs $ $ $ $ $v $ $ $ VV VV ((1++ ((1++ r}-----r cGdd}|||d||dddS)NceZdZdZdZdS)@TestCompare.test_compare_arbitrary_nested_diff..OurClassc||_dSr$)r8)r'r8s rr(zITestCompare.test_compare_arbitrary_nested_diff..OurClass.__init__rr cdS)Nzr/r*s rrzITestCompare.test_compare_arbitrary_nested_diff..OurClass.__repr__s''r Nrr/r rOurClassrs2 ! ! ! ( ( ( ( (r rrSrZaOurClass not as expected: attributes differ: 'args': (,) != (,) While comparing .args: sequence not as expected: same: () first: (,) second: (,) While comparing .args[0]: OurClass not as expected: attributes differ: 'args': (1,) != (2,) While comparing .args[0].args: sequence not as expected: same: () first: (1,) second: (2,)rG)r'rs r"test_compare_arbitrary_nested_diffz.TestCompare.test_compare_arbitrary_nested_diffs} ( ( ( ( ( ( ( (  HXXa[[ ! ! HXXa[[ ! ! " " " " " r c^ttddtdddSrO)rr r*s rtest_compare_slotted_samez%TestCompare.test_compare_slotted_sames(1 wq!}}-----r cl|tddtddddS)NrSrZrzPSlotted not as expected: attributes same: ['x'] attributes differ: 'y': 2 != 3)rCr r*s rtest_compare_slotted_diffz%TestCompare.test_compare_slotted_diffs?  AqMM AqMM  r cVtttdSr$rr*s rtest_empty_setszTestCompare.test_empty_setss suur cZtttddSrrr*s rtest_empty_sets_strictz"TestCompare.test_empty_sets_stricts%suuT******r cp|tdddtdddddS)NirSrZzJdatetime.datetime(2001, 1, 1, 0, 0) != datetime.datetime(2001, 1, 2, 0, 0))rCrr*s rtest_datetime_not_equalz#TestCompare.test_datetime_not_equalsG  T1a T1a  2     r cGddt}Gdd|}||dd|ddddS) NceZdZdZdS)0TestCompare.test_inherited_slots..ParentrDNr,r-r. __slots__r/r rParentrIIIr rceZdZdZdZdS)/TestCompare.test_inherited_slots..Child)rec$||c|_|_dSr$rgrer'rgres rr(z8TestCompare.test_inherited_slots..Child.__init__s!"Ar Nr,r-r.rr(r/r rChildrs(I & & & & &r rrSrRrZzNChild not as expected: attributes same: ['b'] attributes differ: 'a': 1 != 2r[r'rrs rtest_inherited_slotsz TestCompare.test_inherited_slotss     V    & & & & &F & & &  E!SMM E!SMM  r cGddt}Gdd|}t|d|ddS)NceZdZdZdZdS)2TestCompare.test_empty_child_slots..ParentrDc||_dSr$rDrEs rr(z;TestCompare.test_empty_child_slots..Parent.__init__r}r Nrr/r rrrs(I     r rceZdZdZdS)1TestCompare.test_empty_child_slots..Childr/Nrr/r rrrsIIIr rrSrKrs rtest_empty_child_slotsz"TestCompare.test_empty_child_slotss~     V         F    a%%((#####r cGddt}Gdd|}||dd|ddd dS) NceZdZdZdS)0TestCompare.test_slots_and_attrs..ParentrDNrr/r rrrrr rceZdZdZdS)/TestCompare.test_slots_and_attrs..Childc"||_||_dSr$rrs rr(z8TestCompare.test_slots_and_attrs..Child.__init__sr Nrbr/r rrrs#     r rrSrZrzNChild not as expected: attributes same: ['a'] attributes differ: 'b': 2 != 3r%r[rs rtest_slots_and_attrsz TestCompare.test_slots_and_attrss     V        F    %%1++uuQ{{       r c d}d}|t|t|dtt |tt |dS)NcdSr$r/rs rrz8TestCompare.test_partial_callable_different..foor cdSr$r/rs rr|z8TestCompare.test_partial_callable_different..barrr zpartial not as expected: attributes same: ['args', 'keywords'] attributes differ: 'func': {foo} != {bar} While comparing .func: {foo} != {bar})rr|)rCrrrr)r'rr|s rtest_partial_callable_differentz+TestCompare.test_partial_callable_differents  CLL CLL8fS **tCyy0A0AfBB D D D D Dr crd}|t|dt|dddS)NcdSr$r/rs rrz4TestCompare.test_partial_args_different..foorr rSrZzpartial not as expected: attributes same: ['func', 'keywords'] attributes differ: 'args': (1,) != (2,) While comparing .args: sequence not as expected: same: () first: (1,) second: (2,)rCrr'rs rtest_partial_args_differentz'TestCompare.test_partial_args_differentsH  COO COO      r czd}|t|ddt|ddddS) NcdSr$r/rs rrz2TestCompare.test_partial_kw_different..foo6rr rSrrrZrrapartial not as expected: attributes same: ['args', 'func'] attributes differ: 'keywords': {'x': 1, 'y': 3} != {'x': 2, 'z': 4} While comparing .keywords: dict not as expected: in first but not second: 'y': 3 in second but not first: 'z': 4 values differ: 'x': 1 != 2rrs rtest_partial_kw_differentz%TestCompare.test_partial_kw_different4sV  C1 " " " C1 " " "      r cld}tt|ddt|dddS)NcdSr$r/rs rrz+TestCompare.test_partial_equal..fooQrr rSrZr)rrrs rtest_partial_equalzTestCompare.test_partial_equalOs?Q!$$$gc1&:&:&:;;;;;r cGddt}|||d|||ddS)NceZdZdZdZdS)7TestCompare.test_repr_and_attributes_equal..WutcdS)NWutr/r*s rrz@TestCompare.test_repr_and_attributes_equal..Wut.__repr__Xur cdS)NFr/rGs rrIz>TestCompare.test_repr_and_attributes_equal..Wut.__eq__Zrr N)r,r-r.rrIr/r rrrWs2        r rz0Both x and y appear as 'Wut', but are not equal!z   SUU355R      r c Gddt}|d|ddttdt|ddS)Nc eZdZdgZdZdZdS)5TestCompare.test_string_with_slotted..Slottedrc||_dSr$)rrs rr(z>TestCompare.test_string_with_slotted..Slotted.__init__mrar c*t|jSr$)rrr*s rrz>TestCompare.test_string_with_slotted..Slotted.__repr__osDH~~%r N)r,r-r.rr(rr/r rr rks9I    & & & & &r r rz'foo' (z ) != 'foo' (r)rLrCrrK)r'r s rtest_string_with_slottedz$TestCompare.test_string_with_slottedis| & & & & &f & & &   GENNN*.s))))T']]]] C     r c@|ddddddddS)Nrrr|zdict not as expected: values differ: 1: 'foo' != 'bar' 2: 'foo' != 'bar' While comparing [1]: 'foo' != 'bar' While comparing [2]: 'foo' != 'bar'rGr*s rtest_not_recursivezTestCompare.test_not_recursivexs? % %  2     r cd}|tj|dztj|dzddS)NaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaarRraBoth x and y appear as "re.compile('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)", but are not equal!)rCrer)r' shared_prefixs r test_regexzTestCompare.test_regexsP!   J}s* + + J}s* + + T     r cJddi}||d<ddi}||d<t||dS)NrSrrZrWr'r1rBs rtest_self_referential_samez&TestCompare.test_self_referential_sames<u: Uq &!!!!!r cXddi}||d<ddi}||d<|||ddS)NrSrrZr|zgdict not as expected: same: [2] values differ: 1: 'foo' != 'bar' While comparing [1]: 'foo' != 'bar'rGrs rtest_self_referential_differentz+TestCompare.test_self_referential_differentsSu: Uq     2 r ci}||d<i}||d<tt|}||dd||dd|zdz|zdzdS)N ouroborosrrzfdict not as expected: same: [1] values differ: 2: 'foo' != {'ouroboros': } While comparing [2]: 'foo' != )rKidrC)r' ouroboros1 ouroboros2id2s r6test_self_referential_different_but_shows_already_seenzBTestCompare.test_self_referential_different_but_shows_already_seens ", ; ", ;"Z..!! u % %z * * D EH  H ID DEH HIL L r c$Gdd}|}|||||}|||||ddS)Nc"eZdZdZddZdZdS);TestCompare.test_self_referential_object_tree..Nodec"d|_g|_dSr$)parentchildrenr*s rr(zDTestCompare.test_self_referential_object_tree..Node.__init__s" " r childNodecH|j|||_dSr$)rr4r)r'rs raddz?TestCompare.test_self_referential_object_tree..Node.adds# $$U+++# r cd|jdS)Nz.Node.__repr__s11111r N)rr)r,r-r.r(rrr/r rrrsF # # # $ $ $ $ 2 2 2 2 2r rzNode not as expected: attributes same: ['parent'] attributes differ: 'children': [, ] != [] While comparing .children: sequence not as expected: same: [] first: [] second: [])rrC)r'rr1rBs r!test_self_referential_object_treez-TestCompare.test_self_referential_object_trees 2 2 2 2 2 2 2 2466 TTVV TTVV 4466         r cBgd}t||ggdgdgddSNrTrXrWr'items r/test_repeated_object_on_the_left_side_ignore_eqz;TestCompare.test_repeated_object_on_the_left_side_ignore_eqs8yy$yyy))).DPTUUUUUUr c>gd}t||g|gdgddSrrWrs r,test_repeated_object_on_both_sides_ignore_eqz8TestCompare.test_repeated_object_on_both_sides_ignore_eqs3yy$tYYY.?4PPPPPPr c>gd}t||g|gdgddSNrT)r1rBrnrWrs rCtest_repeated_object_on_both_sides_left_at_compare_strict_type_samezOTestCompare.test_repeated_object_on_both_sides_left_at_compare_strict_type_sames3yy$tYYY.?MMMMMMr c>gd}t|gdg||gddSrrWrs rDtest_repeated_object_on_both_sides_right_at_compare_strict_type_samezPTestCompare.test_repeated_object_on_both_sides_right_at_compare_strict_type_sames3yy$ *D$<MMMMMMr cgd}Gddt}t|}|||g||dgdd|ddS)NrceZdZfdZxZS)TTestCompare.test_repeated_object_on_both_sides_strict_type_different..MyListcvdt|jdtdS)N<:r)typer,superr)r' __class__s rrz]TestCompare.test_repeated_object_on_both_sides_strict_type_different..MyList.__repr__s5F4::.FF1A1A1C1CFFFFr )r,r-r.r __classcell__)r s@rrrsA G G G G G G G G Gr rTzsequence not as expected: same: [[1, 2, 3]] first: [[1, 2, 3]] second: [] While comparing [1]: ) != (r)rnr&)rrrC)r'rrr s r8test_repeated_object_on_both_sides_strict_type_differentzDTestCompare.test_repeated_object_on_both_sides_strict_type_differentsyy G G G G GT G G G LL   4L 66)$$ % 4(1 4 4 4      r N)r,r-r.rNrPrTrXr[r^rcrerirlrorqruryr}rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr r rrrrrrrr r#r%r'r)r+r.r0r2r4r6r8r;rCrIrQrUr\r_rarcrfrhrlrorqrsrwryrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr rrrrrr!r$r'r*r,r/r3r5r7r9r=r@rLrLrSrVrYr[rcrhrkrprrrtrwrrrrrrrrrrrrrrrrrrrrrrrrrrrrr/r rrIrIOs    ...***:::@@@444   777             : : :B   &&&            &&&*"000$,            $$$          &&&888   ///   ///***   111   111&&&???  ***  ***    000" BBB ... 4 4 4>   ###   &   ;;;000...CCC,,,...CCC 333(   @@@FFF48B333j666p2(&&&      DDDDDDDDDDDD DDD ,,, ***   ### ''' HHH********   >111      &,,, 999 ...;;;   4   * * * X . . .( ( ( T...    +++      . $ $ $   (DDD(   6   6<<<    (       """   &   *+ + + ZVVVQQQNNNNNN     r rIcXeZdZGddeZGddeZdZdZdZdS) TestIgnoreceZdZdZdZdS)TestIgnore.Parentc"||_||_dSr$)rrH)r'rrHs rr(zTestIgnore.Parent.__init__sDGDJJJr c\dt|j|jS)Nz<{}:{}>)rr r,rr*s rrzTestIgnore.Parent.__repr__"s###DJJ$7AA Ar Nrr/r rrrs7    B B B B Br rceZdZdS)TestIgnore.ChildNr?r/r rrr%rr rc|t|dd|dddhdS)NrSrrZrignore_attributes)rrr*s rtest_ignore_attributesz!TestIgnore.test_ignore_attributes's; Aq!!4;;q!#4#4OOOOOOr c||dd|ddddhdS)NrSrrZz != rr)rCrrr*s r&test_ignore_attributes_different_typesz1TestIgnore.test_ignore_attributes_different_types*sS  KK1   JJq!   %#f      r c|jdhi}t|dd|dd|||dd|ddd|dS)NrrSrrZrzSChild not as expected: attributes same: ['other'] attributes differ: 'id': 1 != 2)rrrCr)r'ignores rtest_ignore_attributes_per_typez*TestIgnore.test_ignore_attributes_per_type2s+v& Aq!!4;;q!#4#4OOOO  JJq!   JJq!   %  r N) r,r-r.rLrrrrrr/r rrrsBBBBBBBBPPP        r rc<eZdZGddeZdZdZdZdS)TestCompareObjectceZdZdZdS)TestCompareObject.Thingc \|D]\}}t|||dSr$)itemssetattr)r'r?kvs rr(z TestCompareObject.Thing.__init__Fs<  $ $1a#### $ $r Nrbr/r rThingr#Es# $ $ $ $ $r r)cd}t|dd|dd|j|idS)Nc*t|||dgSNrrrrs r compare_thingz4TestCompareObject.test_ignore..compare_thingK!!QC5III Ir rSrZrrrrr)r'r.s r test_ignorezTestCompareObject.test_ignoreJsc J J J Q! $$djj1j&:&::}5 7 7 7 7 7 7r cd}t|ddd|ddd|j|i|jdgi dS) Nc*t|||dgSr,r-rs rr.zLTestCompareObject.test_ignore_dict_context_list_param..compare_thingQr/r rSrZrrRrrrrrrrr0r1s r#test_ignore_dict_context_list_paramz5TestCompareObject.test_ignore_dict_context_list_paramPss J J J Q!q ))4::Q!:+D+D:}5#':u"5 7 7 7 7 7 7r cd}t|ddd|ddd|j|idg dS) Nc*t|||dgSr,r-rs rr.zLTestCompareObject.test_ignore_list_context_list_param..compare_thingXr/r rSrZrr5rrrr6r0r1s r#test_ignore_list_context_list_paramz5TestCompareObject.test_ignore_list_context_list_paramWsl J J J Q!q ))4::Q!:+D+D:}5#&% ) ) ) ) ) )r N)r,r-r.rLr)r2r7r:r/r rr!r!Csk$$$$$$$$ 777 777)))))r r!ceZdZdS) BaseClassNr?r/r rr<r<_sDr r<ceZdZdZdS)MyDerivedClassc||_dSr$thingr'rAs rr(zMyDerivedClass.__init__e  r Nrbr/r rr>r>c#r r>ceZdZdS)ConcreteBaseClassNr?r/r rrFrFirr rFceZdZdZdS)ConcreteDerivedClassc||_dSr$r@rBs rr(zConcreteDerivedClass.__init__nrCr Nrbr/r rrHrHlrDr rHc&eZdZdZdZdZdZdS)TestBaseClassescbtd}td}t||dSrV)r>rr'thing1thing2s rtest_abc_equalzTestBaseClasses.test_abc_equalts2""""r crtd}td}|||ddS)NrSrZzCMyDerivedClass not as expected: attributes differ: 'thing': 1 != 2r%)r>rCrMs rtest_abc_unequalz TestBaseClasses.test_abc_unequalzsL"""" &&       r cbtd}td}t||dSrV)rHrrMs rtest_concrete_equalz#TestBaseClasses.test_concrete_equals2%a((%a((r crtd}td}|||ddS)NrSrZzIConcreteDerivedClass not as expected: attributes differ: 'thing': 1 != 2r%)rHrCrMs rtest_concrete_unequalz%TestBaseClasses.test_concrete_unequalsL%a((%a(( &&       r N)r,r-r.rPrRrTrVr/r rrKrKrsP              r rK)8rabcrrrdecimalr functoolsr collectionsrtestfixtures.shouldraiser testfixtures.tests.sample1r r r testfixtures.mockr rr testfixturesrrrrrrrtestfixtures.compatrtestfixtures.comparisonrrunittestrrrrrgr rrLr3r9r"rCrErIrr!r<r>rFrHrKr/r rrbso ########""""""111111JJJJJJJJJJ((((((((+*****DDDDDDDD '" # ####ddff'122  vt4 55552"""""F""" J J J J J -J J J Z>$ $ $ $ $ $ $ $ N))))))))8        Y &%%%%%%%,      m      r