[Bug 20601] New: Tests could have an assertEquals function

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Mar 11 14:00:00 CET 2009


http://bugs.freedesktop.org/show_bug.cgi?id=20601

           Summary: Tests could have an assertEquals function
           Product: Telepathy
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: trivial
          Priority: medium
         Component: telepathy-gabble
        AssignedTo: telepathy-bugs at lists.freedesktop.org
        ReportedBy: simon.mcvittie at collabora.co.uk


12:55 < daf> +            channel_props.get('Interfaces', ()), \
12:55 < daf> +            channel_props.get('Interfaces')
12:55 < daf> what does the second argument win us?
12:56 < daf> oh, it tells us what the value is if the assertion fails
12:56 < daf> the code would be shorter if you did:
12:56 < daf> def assertEquals(expected, value):
12:57 < daf>     assert expected == value, "expected: %r; got: %r" % (expected, 
             value)
12:57 < wjt> daf: that's true of every test
12:57 < smcv> RESOLVED LATER


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the telepathy-bugs mailing list