Remove eval that was required for Py25 support

This commit is contained in:
Scott Maxwell 2013-11-19 08:07:46 -08:00
parent 25dd096da0
commit 7471515fff
1 changed files with 3 additions and 1 deletions

View File

@ -72,8 +72,10 @@ FOLDER = os.environ.get('TEST_FOLDER', 'temp-testing000')
sftp = None
tc = None
g_big_file_test = True
# we need to use eval(compile()) here because Py3.2 doesn't support the 'u' marker for unicode
# this test is the only line in the entire program that has to be treated specially to support Py3.2
unicode_folder = eval(compile(r"u'\u00fcnic\u00f8de'" if PY2 else r"'\u00fcnic\u00f8de'", 'test_sftp.py', 'eval'))
utf8_folder = eval(compile(r"'/\xc3\xbcnic\xc3\xb8\x64\x65'" if PY2 else r"b'/\xc3\xbcnic\xc3\xb8\x64\x65'", 'test_sftp.py', 'eval'))
utf8_folder = b'/\xc3\xbcnic\xc3\xb8\x64\x65'
def get_sftp():
global sftp