summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorScott Maxwell <scott@codecobblers.com>2013-11-19 08:07:46 -0800
committerScott Maxwell <scott@codecobblers.com>2013-11-19 08:07:46 -0800
commit7471515fffd2315f7330c5e1dd42f353982ded6c (patch)
treec4b25e12450567362ac2e4529cfecaf8f81b2dbc
parent25dd096da065b1bc2f35c1a62d8a7055b022818b (diff)
Remove eval that was required for Py25 support
-rwxr-xr-xtests/test_sftp.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_sftp.py b/tests/test_sftp.py
index 1a7ad02c..70fd9103 100755
--- a/tests/test_sftp.py
+++ b/tests/test_sftp.py
@@ -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