1
0

test_timed_subprocess.py 700 B

12345678910111213141516171819202122
  1. # -*- coding: utf-8 -*-
  2. # Import python libs
  3. from __future__ import absolute_import, print_function, unicode_literals
  4. # Import Salt Testing libs
  5. from tests.support.unit import TestCase
  6. # Import salt libs
  7. import salt.utils.timed_subprocess as timed_subprocess
  8. class TestTimedSubprocess(TestCase):
  9. def test_timedproc_with_shell_true_and_list_args(self):
  10. '''
  11. This test confirms the fix for the regression introduced in 1f7d50d.
  12. The TimedProc dunder init would result in a traceback if the args were
  13. passed as a list and shell=True was set.
  14. '''
  15. p = timed_subprocess.TimedProc(['echo', 'foo'], shell=True)
  16. del p # Don't need this anymore