mirror of
https://github.com/python/cpython.git
synced 2026-06-27 19:36:07 +00:00
[3.13] gh-152391: Improve test_interpreters.test_stress test (GH-152396) (#152430)
(cherry picked from commit 219f7a9453)
This commit is contained in:
parent
f158c0a585
commit
4b6a199ef3
1 changed files with 7 additions and 3 deletions
|
|
@ -25,6 +25,7 @@ def test_create_many_sequential(self):
|
|||
del alive
|
||||
support.gc_collect()
|
||||
|
||||
@threading_helper.requires_working_threading()
|
||||
@support.bigmemtest(size=200, memuse=32*2**20, dry_run=False)
|
||||
def test_create_many_threaded(self, size):
|
||||
alive = []
|
||||
|
|
@ -79,9 +80,12 @@ def run():
|
|||
def test_create_interpreter_no_memory(self):
|
||||
import _testcapi
|
||||
|
||||
with self.assertRaises(InterpreterError):
|
||||
_testcapi.set_nomemory(0, 1)
|
||||
_interpreters.create()
|
||||
try:
|
||||
with self.assertRaises(InterpreterError):
|
||||
_testcapi.set_nomemory(0, 1)
|
||||
_interpreters.create()
|
||||
finally:
|
||||
_testcapi.remove_mem_hooks()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue