mirror of
https://github.com/python/cpython
synced 2024-10-02 23:59:15 +00:00
GH-114743: Set a low recursion limit for test_main_recursion_error()
in test_runpy
(GH-114772)
This can fail under a debug build of WASI when directly executing test.test_runpy.
This commit is contained in:
parent
574291963f
commit
2ed8f924ee
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -159,5 +159,5 @@ Python/frozen_modules/MANIFEST
|
|||
/python
|
||||
!/Python/
|
||||
|
||||
# main branch only: ABI files are not checked/maintained
|
||||
# main branch only: ABI files are not checked/maintained.
|
||||
Doc/data/python*.abi
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
import textwrap
|
||||
import unittest
|
||||
import warnings
|
||||
from test.support import no_tracing, verbose, requires_subprocess, requires_resource
|
||||
from test.support import (infinite_recursion, no_tracing, verbose,
|
||||
requires_subprocess, requires_resource)
|
||||
from test.support.import_helper import forget, make_legacy_pyc, unload
|
||||
from test.support.os_helper import create_empty_file, temp_dir
|
||||
from test.support.script_helper import make_script, make_zip_script
|
||||
|
@ -743,6 +744,7 @@ def test_main_recursion_error(self):
|
|||
"runpy.run_path(%r)\n") % dummy_dir
|
||||
script_name = self._make_test_script(script_dir, mod_name, source)
|
||||
zip_name, fname = make_zip_script(script_dir, 'test_zip', script_name)
|
||||
with infinite_recursion(25):
|
||||
self.assertRaises(RecursionError, run_path, zip_name)
|
||||
|
||||
def test_encoding(self):
|
||||
|
|
Loading…
Reference in a new issue