summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2012-10-15 12:57:39 -0700
committerJeff Forcier <jeff@bitprophet.org>2012-10-15 12:57:39 -0700
commit7c12862b55224faea75758ceef78135fa9119df2 (patch)
tree5f31c1326d2f8f615d9a8e3bb7c7ff36736b0fc4 /tests
parent1341e28882998a08fa2bf00c21047207dff3e18a (diff)
Only override unittest assertions when absolutely necessary.
Fixes #85
Diffstat (limited to 'tests')
-rw-r--r--tests/test_transport.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_transport.py b/tests/test_transport.py
index cea4a1dd..67926d16 100644
--- a/tests/test_transport.py
+++ b/tests/test_transport.py
@@ -107,8 +107,10 @@ class NullServer (ServerInterface):
class TransportTest (unittest.TestCase):
- assertTrue = unittest.TestCase.failUnless # for Python 2.3 and below
- assertFalse = unittest.TestCase.failIf # for Python 2.3 and below
+ if not hasattr(unittest.TestCase, 'assertTrue'):
+ assertTrue = unittest.TestCase.failUnless # for Python 2.3 and below
+ if not hasattr(unittest.TestCase, 'assertFalse'):
+ assertFalse = unittest.TestCase.failIf # for Python 2.3 and below
def setUp(self):
self.socks = LoopSocket()