summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
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()