diff options
author | Michael Williamson <mike@zwobble.org> | 2013-01-05 00:05:58 +0000 |
---|---|---|
committer | Michael Williamson <mike@zwobble.org> | 2013-01-05 00:05:58 +0000 |
commit | 0b6aebb8a95d44102968a3e0caf94cd234369e5d (patch) | |
tree | d4556f8a2e27cfae6447760c93e8667fc9af2fd2 | |
parent | 602250fdf9515a8127cd567d79afa8134d4cf923 (diff) |
Verify Python version >= 2.6 before running context manager test
-rwxr-xr-x | tests/test_sftp.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_sftp.py b/tests/test_sftp.py index 39c8aa83..7ce3e68c 100755 --- a/tests/test_sftp.py +++ b/tests/test_sftp.py @@ -192,6 +192,10 @@ class SFTPTest (unittest.TestCase): """ verify that an opened file can be used as a context manager """ + major, minor, micro, releaselevel, serial = sys.version_info + if (major, minor) <= (2, 5): + return + try: with sftp.open(FOLDER + '/duck.txt', 'w') as f: f.write(ARTICLE) |