예제 #1
0
 def test_should_escape_single_quotes_in_args(self):
     eq_(
         lib._format_popen_args(args=(["a", "b'", "c"], ),
                                kwargs={},
                                platform="linux"),
         "Running: 'a' 'b'\"'\"'' 'c'")
예제 #2
0
 def test_should_use_single_quotes_on_non_windows(self):
     eq_(
         lib._format_popen_args(args=(["a", "b", "c"], ),
                                kwargs={},
                                platform="linux"), "Running: 'a' 'b' 'c'")
예제 #3
0
 def test_should_perform_no_quoting_if_shell_true(self):
     eq_(
         lib._format_popen_args(args=("a b c", ),
                                kwargs={'shell': True},
                                platform=None), 'Running shell: a b c')
	def test_should_escape_single_quotes_in_args(self):
		eq_(lib._format_popen_args(args=(["a", "b'", "c"],), kwargs={}, platform="linux"), "Running: 'a' 'b'\"'\"'' 'c'")
	def test_should_use_single_quotes_on_non_windows(self):
		eq_(lib._format_popen_args(args=(["a", "b", "c"],), kwargs={}, platform="linux"), "Running: 'a' 'b' 'c'")
	def test_should_perform_no_quoting_if_shell_true(self):
		eq_(lib._format_popen_args(args=("a b c",), kwargs={'shell':True}, platform=None), 'Running shell: a b c')