1
0

test_timed_subprocess.py 699 B

123456789101112131415161718192021
  1. # -*- coding: utf-8 -*-
  2. # Import python libs
  3. from __future__ import absolute_import, print_function, unicode_literals
  4. # Import salt libs
  5. import salt.utils.timed_subprocess as timed_subprocess
  6. # Import Salt Testing libs
  7. from tests.support.unit import TestCase
  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