From 3ce336c88b7bfbfad03fab17bff8cb3c3a77176c Mon Sep 17 00:00:00 2001 From: Scott Maxwell Date: Tue, 19 Nov 2013 07:30:45 -0800 Subject: Change conditional from PY3 to PY2 to be better prepared for a possible Py4. --- tests/test_pkey.py | 2 +- tests/test_sftp.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/test_pkey.py b/tests/test_pkey.py index f8549468..19c5c698 100644 --- a/tests/test_pkey.py +++ b/tests/test_pkey.py @@ -23,7 +23,7 @@ Some unit tests for public/private key objects. from binascii import hexlify, unhexlify import unittest from paramiko import RSAKey, DSSKey, ECDSAKey, Message, util -from paramiko.common import rng, StringIO, byte_chr, b, PY3, bytes +from paramiko.common import rng, StringIO, byte_chr, b, bytes from tests.util import test_path # from openssh's ssh-keygen diff --git a/tests/test_sftp.py b/tests/test_sftp.py index b84b3fd6..4a412582 100755 --- a/tests/test_sftp.py +++ b/tests/test_sftp.py @@ -72,8 +72,8 @@ FOLDER = os.environ.get('TEST_FOLDER', 'temp-testing000') sftp = None tc = None g_big_file_test = True -unicode_folder = eval(compile(r"'\u00fcnic\u00f8de'" if PY3 else r"u'\u00fcnic\u00f8de'", 'test_sftp.py', 'eval')) -utf8_folder = eval(compile(r"b'/\xc3\xbcnic\xc3\xb8\x64\x65'" if PY3 else r"'/\xc3\xbcnic\xc3\xb8\x64\x65'", 'test_sftp.py', 'eval')) +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')) def get_sftp(): global sftp -- cgit v1.2.3