summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-08-30 19:33:04 (GMT)
committerGitHub <noreply@github.com>2023-08-30 19:33:04 (GMT)
commitf59c66e8c8a6715c585cf2cdf1f99715480b4da1 (patch)
tree86370ef5642dc8aeebb69ef7264f87df0fa59245
parentadd8d45cbe46581b9748909fbbf60fdc8ee8f71e (diff)
downloadcpython-f59c66e8c8a6715c585cf2cdf1f99715480b4da1.zip
cpython-f59c66e8c8a6715c585cf2cdf1f99715480b4da1.tar.gz
cpython-f59c66e8c8a6715c585cf2cdf1f99715480b4da1.tar.bz2
gh-108297: Remove test_crashers (#108690)
The test was skipped in 2011 by commit 89ba56d5fb1335ef808b87cd33cba95ea141c65d. Scripts in Lib/test/crashers/ do not crash on a reliable way. They rely on undefined behaviors, like state of the stack memory, and so may or may not crash. It is not worth it to make sure that they crash in a continious integration, they should be run manually time to time instead.
-rw-r--r--Lib/test/test_crashers.py37
1 files changed, 0 insertions, 37 deletions
diff --git a/Lib/test/test_crashers.py b/Lib/test/test_crashers.py
deleted file mode 100644
index 31b7120..0000000
--- a/Lib/test/test_crashers.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# Tests that the crashers in the Lib/test/crashers directory actually
-# do crash the interpreter as expected
-#
-# If a crasher is fixed, it should be moved elsewhere in the test suite to
-# ensure it continues to work correctly.
-
-import unittest
-import glob
-import os.path
-import test.support
-from test.support.script_helper import assert_python_failure
-
-CRASHER_DIR = os.path.join(os.path.dirname(__file__), "crashers")
-CRASHER_FILES = os.path.join(glob.escape(CRASHER_DIR), "*.py")
-
-infinite_loops = ["infinite_loop_re.py", "nasty_eq_vs_dict.py"]
-
-class CrasherTest(unittest.TestCase):
-
- @unittest.skip("these tests are too fragile")
- @test.support.cpython_only
- def test_crashers_crash(self):
- for fname in glob.glob(CRASHER_FILES):
- if os.path.basename(fname) in infinite_loops:
- continue
- # Some "crashers" only trigger an exception rather than a
- # segfault. Consider that an acceptable outcome.
- if test.support.verbose:
- print("Checking crasher:", fname)
- assert_python_failure(fname)
-
-
-def tearDownModule():
- test.support.reap_children()
-
-if __name__ == "__main__":
- unittest.main()