From 06b866cf406c035ecaffd7a8abd31d6e07b8811a Mon Sep 17 00:00:00 2001 From: Scott Maxwell Date: Fri, 1 Nov 2013 01:06:17 -0700 Subject: [PATCH] Don't import test_sftp or test_sftp_big unless we are going to do the tests --- test.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test.py b/test.py index 159794c..1162da0 100755 --- a/test.py +++ b/test.py @@ -42,8 +42,6 @@ from tests.test_kex import KexTest from tests.test_packetizer import PacketizerTest from tests.test_auth import AuthTest from tests.test_transport import TransportTest -from tests.test_sftp import SFTPTest -from tests.test_sftp_big import BigSFTPTest from tests.test_client import SSHClientTest default_host = 'localhost' @@ -109,13 +107,16 @@ def main(): paramiko.util.log_to_file('test.log') if options.use_sftp: + from tests.test_sftp import SFTPTest if options.use_loopback_sftp: SFTPTest.init_loopback() else: SFTPTest.init(options.hostname, options.username, options.keyfile, options.password) if not options.use_big_file: SFTPTest.set_big_file_test(False) - + if options.use_big_file: + from tests.test_sftp_big import BigSFTPTest + suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(MessageTest)) suite.addTest(unittest.makeSuite(BufferedFileTest))