(self)
| 2252 | self.assertEqual(exit_code, 0) |
| 2253 | |
| 2254 | def test_prompt_after_help(self): |
| 2255 | output, exit_code = self.run_repl(["help", "q", "exit"]) |
| 2256 | |
| 2257 | # Regex pattern to remove ANSI escape sequences |
| 2258 | ansi_escape = re.compile(r"(\x1B(=|>|(\[)[0-?]*[ -\/]*[@-~]))") |
| 2259 | cleaned_output = ansi_escape.sub("", output) |
| 2260 | self.assertEqual(exit_code, 0) |
| 2261 | |
| 2262 | # Ensure that we don't see multiple prompts after exiting `help` |
| 2263 | # Extra stuff (newline and `exit` rewrites) are necessary |
| 2264 | # because of how run_repl works. |
| 2265 | self.assertNotIn(">>> \n>>> >>>", cleaned_output) |
| 2266 | |
| 2267 | @skipUnless(Py_DEBUG, '-X showrefcount requires a Python debug build') |
| 2268 | def test_showrefcount(self): |
nothing calls this directly
no test coverage detected