merge patch from Dwayne Litzenberger to fix unit tests on python 2.3.
This commit is contained in:
Robey Pointer 2008-02-17 21:12:29 -08:00
parent cb3a0a4c3d
commit 9e67c45053
3 changed files with 9 additions and 0 deletions

View File

@ -41,6 +41,9 @@ def close_thread(pipe):
class BufferedPipeTest (unittest.TestCase): 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): def test_1_buffered_pipe(self):
p = BufferedPipe() p = BufferedPipe()
self.assert_(not p.read_ready()) self.assert_(not p.read_ready())

View File

@ -90,6 +90,9 @@ class NullServer (ServerInterface):
class TransportTest (unittest.TestCase): 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): def setUp(self):
self.socks = LoopSocket() self.socks = LoopSocket()
self.sockc = LoopSocket() self.sockc = LoopSocket()

View File

@ -59,6 +59,9 @@ from paramiko import *
class UtilTest (unittest.TestCase): 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): def setUp(self):
pass pass