def METHOD_NAME(self):
    # check_call() function with non-zero return code
    with self.assertRaises(subprocess.CalledProcessError) as c:
        subprocess.check_call([sys.executable, "-c",
                               "import sys; sys.exit(47)"])
    self.assertEqual(c.exception.returncode, 47)