This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Ankur.Ankan, Elena.Oat, Jacek.Bzdak, Puneeth.Chaganti, ankurankan, ezio.melotti, michael.foord, nnja, pitrou, serhiy.storchaka, vstinner
Date 2014-08-10.08:14:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1407658487.59.0.376384787688.issue19217@psf.upfronthosting.co.za>
In-reply-to
Content
Here is alternative patch. It outputs line diff even for large sequences/dicts/strings.

With the attached patch, unittest_scse.py works fine, producing this output:

FF
======================================================================
FAIL: test_compare (__main__.SCSE)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "unittest_scse.py", line 14, in test_compare
    self.assertEqual(arr1, arr2)
AssertionError: Lists differ: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,[29953 chars]1, 1] != [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,[29953 chars]2, 2]

First differing element 0:
1
2

- [1,
-  1,
-  1,
-  1,
-  1,
-  1,
-  1,
-  1,
-  1,
-  1,
-  1,
-  1,
-  1,
-  1,
-  1,
-  1,
-  1,
-  1,
-  1,
-  1,
-  1,
-  1,
-  1,
-  1,
-  1,
-  1,
-  1,
-  1,
-  1,
-  1,
-  1,
-  1,
+ [2,
+  2,
+  2,
+  2,
+  2,
+  2,
+  2,
+  2,
+  2,
+  2,
+  2,
+  2,
+  2,
+  2,
+  2,
+  2,
+  2,
+  2,
+  2,
+  2,
+  2,
+  2,
+  2,
+  2,
+  2,
+  2,
+  2,
+  2,
+  2,
+  2,
+  2,
+  2,
...
*** Diff is truncated.  Set self.maxDiffItems to None to see it all.

======================================================================
FAIL: test_compare_2 (__main__.SCSE)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "unittest_scse.py", line 24, in test_compare_2
    self.assertEqual(arr1, arr2)
AssertionError: Lists differ: [1, 1[29932 chars] 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] != [1, 1[29932 chars] 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2]

First differing element 9999:
1
2

-  1]
+  2]

----------------------------------------------------------------------
Ran 2 tests in 1.813s

FAILED (failures=2)
History
Date User Action Args
2014-08-10 08:14:48serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, vstinner, ezio.melotti, michael.foord, Jacek.Bzdak, Ankur.Ankan, Elena.Oat, nnja, ankurankan, Puneeth.Chaganti
2014-08-10 08:14:47serhiy.storchakasetmessageid: <1407658487.59.0.376384787688.issue19217@psf.upfronthosting.co.za>
2014-08-10 08:14:47serhiy.storchakalinkissue19217 messages
2014-08-10 08:14:47serhiy.storchakacreate