[Buildbot-commits] [Buildbot] #2521: Replace deprecated method unittest.TestCase.assert_() with newer assertEqual/NotEqual
Buildbot trac
trac at buildbot.net
Mon Jul 1 07:14:42 UTC 2013
#2521: Replace deprecated method unittest.TestCase.assert_() with newer
assertEqual/NotEqual
------------------------+-----------------------
Reporter: rutsky | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: undecided
Version: 0.8.7p1 | Keywords: tests
------------------------+-----------------------
Some of tests use deprecated `unittest.TestCase.assert_()` method, like in
[https://github.com/buildbot/buildbot/blob/master/master/buildbot/test/unit/test_changes_mail_CVSMaildirSource.py#L110
test_changes_mail_CVSMaildirSource.py]:
{{{
self.assert_(chdict['revision'] == '2010-08-11 04:56:44')
}}}
When such test fails developer only know, that `chdict['revision']` is not
`'2010-08-11 04:56:44'`, but he doesn't know which value it actually has
--- that is often required for proper problem analysis.
Use for modern `assertEqual()`, `assertNotEqual()` solves this problem.
--
Ticket URL: <http://trac.buildbot.net/ticket/2521>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
More information about the Commits
mailing list