Verify Python version >= 2.6 before running context manager test
This commit is contained in:
parent
602250fdf9
commit
0b6aebb8a9
|
@ -192,6 +192,10 @@ class SFTPTest (unittest.TestCase):
|
||||||
"""
|
"""
|
||||||
verify that an opened file can be used as a context manager
|
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:
|
try:
|
||||||
with sftp.open(FOLDER + '/duck.txt', 'w') as f:
|
with sftp.open(FOLDER + '/duck.txt', 'w') as f:
|
||||||
f.write(ARTICLE)
|
f.write(ARTICLE)
|
||||||
|
|
Loading…
Reference in New Issue