Serhiy Storchaka added the comment: Perhaps it will be even better to extract loop body as a local function and then call it with different arguments.
def check(dup): self.assertTrue(dup is not od) self.assertEqual(dup, od) ... check(od.copy()) check(copy.copy(od)) ... In this case we will see a tested case right in the traceback. ---------- nosy: +ezio.melotti, michael.foord, pitrou, serhiy.storchaka _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18106> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com