Re: [Python-Dev] [Python-checkins] cpython: provide a common method to check for RETR_DATA validity, first checking the

Jan. 17, 2012
11:27 a.m.
Hi Giampaolo,
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
4808
Age (days ago)
4808
Last active (days ago)
0 comments
1 participants
participants (1)
-
Éric Araujo