From 189a490e27a8a12e93b8b82822100fe197c5dbeb Mon Sep 17 00:00:00 2001 From: Moreal Date: Wed, 18 Jan 2023 15:58:40 +0900 Subject: [PATCH] Unmark resolved tests --- Lib/test/test_runpy.py | 25 +++++++++++++------------ Lib/test/test_signal.py | 2 -- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/Lib/test/test_runpy.py b/Lib/test/test_runpy.py index 0a4da9c82..48e25a06b 100644 --- a/Lib/test/test_runpy.py +++ b/Lib/test/test_runpy.py @@ -790,13 +790,9 @@ class TestExit(unittest.TestCase): self.assertTrue(proc.stderr.endswith("\nKeyboardInterrupt\n")) self.assertEqual(proc.returncode, self.EXPECTED_CODE) - # TODO: RUSTPYTHON - @unittest.expectedFailure def test_pymain_run_file(self): self.assertSigInt([sys.executable, self.ham]) - # TODO: RUSTPYTHON - @unittest.expectedFailure def test_pymain_run_file_runpy_run_module(self): tmp = self.ham.parent run_module = tmp / "run_module.py" @@ -810,8 +806,6 @@ class TestExit(unittest.TestCase): ) self.assertSigInt([sys.executable, run_module], cwd=tmp) - # TODO: RUSTPYTHON - @unittest.expectedFailure def test_pymain_run_file_runpy_run_module_as_main(self): tmp = self.ham.parent run_module_as_main = tmp / "run_module_as_main.py" @@ -825,16 +819,12 @@ class TestExit(unittest.TestCase): ) self.assertSigInt([sys.executable, run_module_as_main], cwd=tmp) - # TODO: RUSTPYTHON - @unittest.expectedFailure def test_pymain_run_command_run_module(self): self.assertSigInt( [sys.executable, "-c", "import runpy; runpy.run_module('ham')"], cwd=self.ham.parent, ) - # TODO: RUSTPYTHON - @unittest.expectedFailure def test_pymain_run_command(self): self.assertSigInt([sys.executable, "-c", "import ham"], cwd=self.ham.parent) @@ -843,12 +833,23 @@ class TestExit(unittest.TestCase): def test_pymain_run_stdin(self): self.assertSigInt([sys.executable], input="import ham", cwd=self.ham.parent) - # TODO: RUSTPYTHON - @unittest.expectedFailure def test_pymain_run_module(self): ham = self.ham self.assertSigInt([sys.executable, "-m", ham.stem], cwd=ham.parent) + # TODO: RUSTPYTHON + if sys.platform == "win32": + windows_only_failed_tests = [ + test_pymain_run_file, + test_pymain_run_file_runpy_run_module, + test_pymain_run_file_runpy_run_module_as_main, + test_pymain_run_command_run_module, + test_pymain_run_command, + test_pymain_run_module + ] + for t in windows_only_failed_tests: + unittest.expectedFailure(t) + if __name__ == "__main__": unittest.main() diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py index b39866be8..f8122f061 100644 --- a/Lib/test/test_signal.py +++ b/Lib/test/test_signal.py @@ -96,8 +96,6 @@ class PosixTests(unittest.TestCase): self.assertNotIn(signal.NSIG, s) self.assertLess(len(s), signal.NSIG) - # TODO: RUSTPYTHON - @unittest.expectedFailure @unittest.skipUnless(sys.executable, "sys.executable required.") def test_keyboard_interrupt_exit_code(self): """KeyboardInterrupt triggers exit via SIGINT."""