[test_playlist] Add and use assertGreaterEqual

This commit is contained in:
Philipp Hagemeister 2014-07-21 12:25:49 +02:00
parent 4f95d455ed
commit d8624e6a80
2 changed files with 31 additions and 23 deletions

View file

@ -148,3 +148,10 @@ def assertRegexpMatches(self, text, regexp, msg=None):
else:
msg = note + ', ' + msg
self.assertTrue(m, msg)
def assertGreaterEqual(self, got, expected, msg=None):
if not (got >= expected):
if msg is None:
msg = '%r not greater than or equal to %r' % (got, expected)
self.assertTrue(got >= expected, msg)