From 5599e736ba788741ea57571d90828b72f5184a91 Mon Sep 17 00:00:00 2001 From: maxkoryukov Date: Wed, 3 Feb 2016 18:32:02 +0500 Subject: [PATCH] improved testing crutches for python 2.6 --- headphones/unittestcompat.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/headphones/unittestcompat.py b/headphones/unittestcompat.py index d77c6a16..f213295e 100644 --- a/headphones/unittestcompat.py +++ b/headphones/unittestcompat.py @@ -34,6 +34,12 @@ class TestCase(TC): def assertIn(self, *args, **kw): return super(TestCase, self).assertIn(*args, **kw) + def assertIsNone(self, val, msg=None): + if not _dummy: + return super(TestCase, self).assertIsNone(val, msg) + tst = val is None + return super(TestCase, self).assertTrue(tst, msg) + def assertIsNotNone(self, val, msg=None): if not _dummy: return super(TestCase, self).assertIsNotNone(val, msg)