Hi Giampaolo, > changeset: 53a5a5b8859d > user: Giampaolo Rodola' <g.rodola at gmail.com> > date: Mon Jan 09 17:10:10 2012 +0100 > summary: > provide a common method to check for RETR_DATA validity, first > checking the expected len and then the actual data content; this > way we get a failure on len mismatch rather than content mismatch > (which is very long and unreadable) My trick is to convert long strings to lists (with data.split(appropriate line ending)) and pass them to assertEqual. Then I get more readable element-based diffs when there is a test failure. Another trick I use is this (for example when I don’t want to make too much diff noise, or when I don’t want to build the list of expected results): self.assertEqual(len(got), 3, got) unittest will print the third argument on failure. Regards
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4