From 9e67c45053cf330e4122f18f60f9257214231d3d Mon Sep 17 00:00:00 2001 From: Robey Pointer Date: Sun, 17 Feb 2008 21:12:29 -0800 Subject: [PATCH] [project @ robey@lag.net-20080218051229-xtylb1poe246k2ci] merge patch from Dwayne Litzenberger to fix unit tests on python 2.3. --- tests/test_buffered_pipe.py | 3 +++ tests/test_transport.py | 3 +++ tests/test_util.py | 3 +++ 3 files changed, 9 insertions(+) diff --git a/tests/test_buffered_pipe.py b/tests/test_buffered_pipe.py index bef8fb8..f96edb8 100644 --- a/tests/test_buffered_pipe.py +++ b/tests/test_buffered_pipe.py @@ -41,6 +41,9 @@ def close_thread(pipe): class BufferedPipeTest (unittest.TestCase): + assertTrue = unittest.TestCase.failUnless # for Python 2.3 and below + assertFalse = unittest.TestCase.failIf # for Python 2.3 and below + def test_1_buffered_pipe(self): p = BufferedPipe() self.assert_(not p.read_ready()) diff --git a/tests/test_transport.py b/tests/test_transport.py index 5ba4acc..894c69d 100644 --- a/tests/test_transport.py +++ b/tests/test_transport.py @@ -90,6 +90,9 @@ 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 + def setUp(self): self.socks = LoopSocket() self.sockc = LoopSocket() diff --git a/tests/test_util.py b/tests/test_util.py index 05fcc67..bbfa859 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -59,6 +59,9 @@ from paramiko import * class UtilTest (unittest.TestCase): + assertTrue = unittest.TestCase.failUnless # for Python 2.3 and below + assertFalse = unittest.TestCase.failIf # for Python 2.3 and below + def setUp(self): pass