Exemplo n.º 1
0
 def test_check_call_nonzero(self):
     # check_call() function with non-zero return code
     try:
         subprocess.check_call(
             [sys.executable, "-c", "import sys; sys.exit(47)"])
     except subprocess.CalledProcessError, e:
         self.assertEqual(e.returncode, 47)
Exemplo n.º 2
0
 def test_check_call_nonzero(self):
     # check_call() function with non-zero return code
     try:
         subprocess.check_call([sys.executable, "-c",
                                "import sys; sys.exit(47)"])
     except subprocess.CalledProcessError, e:
         self.assertEqual(e.returncode, 47)
Exemplo n.º 3
0
 def test_check_call_zero(self):
     # check_call() function with zero return code
     rc = subprocess.check_call(
         [sys.executable, "-c", "import sys; sys.exit(0)"])
     self.assertEqual(rc, 0)
Exemplo n.º 4
0
 def test_check_call_zero(self):
     # check_call() function with zero return code
     rc = subprocess.check_call([sys.executable, "-c",
                                 "import sys; sys.exit(0)"])
     self.assertEqual(rc, 0)