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)
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)
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)
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)