summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorScott Maxwell <scott@codecobblers.com>2013-11-01 01:06:17 -0700
committerScott Maxwell <scott@codecobblers.com>2013-11-01 01:06:17 -0700
commit06b866cf406c035ecaffd7a8abd31d6e07b8811a (patch)
treebc78f369fd08c40851b00809d1186799ef6cf090
parent201a61d66dd3c788abb67741de975a56f7df2061 (diff)
Don't import test_sftp or test_sftp_big unless we are going to do the tests
-rwxr-xr-xtest.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test.py b/test.py
index 159794c5..1162da07 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))