aboutsummaryrefslogtreecommitdiffstats
path: root/test/helper.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-07-21 12:25:49 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2014-07-21 12:25:49 +0200
commitd8624e6a80751c09a48ff6b9db1d4d85e377c437 (patch)
treeb6db213d8cec0f31eda694a28552c7687106c5c8 /test/helper.py
parent4f95d455edf20583abd85801c23e88fa749be237 (diff)
downloadyoutube-dl-d8624e6a80751c09a48ff6b9db1d4d85e377c437.zip
youtube-dl-d8624e6a80751c09a48ff6b9db1d4d85e377c437.tar.gz
youtube-dl-d8624e6a80751c09a48ff6b9db1d4d85e377c437.tar.bz2
[test_playlist] Add and use assertGreaterEqual
Diffstat (limited to 'test/helper.py')
-rw-r--r--test/helper.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/helper.py b/test/helper.py
index 230d2bd..84b16f7 100644
--- a/test/helper.py
+++ b/test/helper.py
@@ -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)