diff --git a/NEWS b/NEWS index e53caa0c2162c57570fafd07aab5209482e03879_TkVXUw==..05d2fe56ddbf5217acbaf9508da8b83264ab52f8_TkVXUw== 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,11 @@ * #90: Ensure that callbacks handed to `SFTPClient.get()` always fire at least once, even for zero-length files downloaded. Thanks to Github user `@enB` for the catch. +* #85: Paramiko's test suite overrides + `unittest.TestCase.assertTrue/assertFalse` to provide these modern assertions + to Python 2.2/2.3, which lacked them. However on newer Pythons such as 2.7, + this now causes deprecation warnings. The overrides have been patched to only + execute when necessary. Thanks to `@Arfrever` for catch & patch. v1.8.0 (3rd Oct 2012) diff --git a/tests/test_transport.py b/tests/test_transport.py index e53caa0c2162c57570fafd07aab5209482e03879_dGVzdHMvdGVzdF90cmFuc3BvcnQucHk=..05d2fe56ddbf5217acbaf9508da8b83264ab52f8_dGVzdHMvdGVzdF90cmFuc3BvcnQucHk= 100644 --- a/tests/test_transport.py +++ b/tests/test_transport.py @@ -107,8 +107,10 @@ 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()