Show More
@@ -600,9 +600,16 b' class TestSystemRaw(ExitCodeChecks):' | |||
|
600 | 600 | try: |
|
601 | 601 | self.system("sleep 1 # wont happen") |
|
602 | 602 | except KeyboardInterrupt: |
|
603 | self.fail("system call should intercept " | |
|
604 | "keyboard interrupt from subprocess.call") | |
|
605 | self.assertEqual(ip.user_ns['_exit_code'], -signal.SIGINT) | |
|
603 | self.fail( | |
|
604 | "system call should intercept " | |
|
605 | "keyboard interrupt from subprocess.call" | |
|
606 | ) | |
|
607 | self.assertEqual(ip.user_ns["_exit_code"], -signal.SIGINT) | |
|
608 | ||
|
609 | def test_magic_warnings(self): | |
|
610 | for magic_cmd in ("ls", "pip", "conda", "cd"): | |
|
611 | with self.assertWarnsRegex(Warning, "You executed the system command"): | |
|
612 | ip.system_raw(magic_cmd) | |
|
606 | 613 | |
|
607 | 614 | # TODO: Exit codes are currently ignored on Windows. |
|
608 | 615 | class TestSystemPipedExitCode(ExitCodeChecks): |
General Comments 0
You need to be logged in to leave comments.
Login now