@@ -217,7 +217,7 @@ def test_pssh_client_ssh_exception(self):
217
217
self .assertRaises (SSHException , client .run_command , self .fake_cmd )
218
218
del client
219
219
server .kill ()
220
-
220
+
221
221
def test_pssh_client_timeout (self ):
222
222
server_timeout = 0.2
223
223
client_timeout = server_timeout - 0.1
@@ -269,7 +269,7 @@ def test_pssh_client_long_running_command_exit_codes(self):
269
269
self .assertTrue (output [self .host ]['exit_code' ] == 0 ,
270
270
msg = "Got non-zero exit code %s" % (
271
271
output [self .host ]['exit_code' ],))
272
-
272
+
273
273
def test_pssh_client_retries (self ):
274
274
"""Test connection error retries"""
275
275
listen_port = self .make_random_port ()
@@ -287,7 +287,7 @@ def test_pssh_client_retries(self):
287
287
"expected %s" % (num_tries , expected_num_tries ,))
288
288
else :
289
289
raise Exception ('No ConnectionErrorException' )
290
-
290
+
291
291
def test_sftp_exceptions (self ):
292
292
# Port with no server listening on it on separate ip
293
293
host = '127.0.0.3'
@@ -297,7 +297,7 @@ def test_sftp_exceptions(self):
297
297
client .pool .join ()
298
298
for cmd in cmds :
299
299
self .assertRaises (ConnectionErrorException , cmd .get )
300
-
300
+
301
301
def test_pssh_copy_file (self ):
302
302
"""Test parallel copy file"""
303
303
test_file_data = 'test'
@@ -319,7 +319,7 @@ def test_pssh_copy_file(self):
319
319
os .unlink (filepath )
320
320
shutil .rmtree (remote_test_dir )
321
321
del client
322
-
322
+
323
323
def test_pssh_client_directory (self ):
324
324
"""Tests copying multiple directories with SSH client. Copy all the files from
325
325
local directory to server, then make sure they are all present."""
@@ -405,7 +405,7 @@ def test_pssh_client_copy_file_failure(self):
405
405
os .chmod (remote_test_path , mask )
406
406
for path in [local_test_path , remote_test_path ]:
407
407
shutil .rmtree (path )
408
-
408
+
409
409
def test_pssh_copy_remote_file (self ):
410
410
"""Test parallel copy file to local host"""
411
411
test_file_data = 'test'
@@ -737,7 +737,7 @@ def test_ssh_exception(self):
737
737
else :
738
738
raise Exception ("Expected SSHException" )
739
739
server .kill ()
740
-
740
+
741
741
def test_multiple_single_quotes_in_cmd (self ):
742
742
"""Test that we can run a command with multiple single quotes"""
743
743
output = self .client .run_command ("echo 'me' 'and me'" )
@@ -751,15 +751,15 @@ def test_multiple_single_quotes_in_cmd(self):
751
751
self .assertEqual (expected , stdout [0 ],
752
752
msg = "Got unexpected output. Expected %s, got %s" % (
753
753
expected , stdout [0 ],))
754
-
754
+
755
755
def test_backtics_in_cmd (self ):
756
756
"""Test running command with backtics in it"""
757
757
output = self .client .run_command ("out=`ls` && echo $out" )
758
758
self .client .join (output )
759
759
self .assertTrue (output [self .host ]['exit_code' ] == 0 ,
760
760
msg = "Error executing cmd with backtics - error code %s" % (
761
761
output [self .host ]['exit_code' ],))
762
-
762
+
763
763
def test_multiple_shell_commands (self ):
764
764
"""Test running multiple shell commands in one go"""
765
765
output = self .client .run_command ("echo me; echo and; echo me" )
@@ -771,7 +771,7 @@ def test_multiple_shell_commands(self):
771
771
self .assertEqual (expected , stdout ,
772
772
msg = "Got unexpected output. Expected %s, got %s" % (
773
773
expected , stdout ,))
774
-
774
+
775
775
def test_escaped_quotes (self ):
776
776
"""Test escaped quotes in shell variable are handled correctly"""
777
777
output = self .client .run_command ('t="--flags=\\ "this\\ ""; echo $t' )
0 commit comments