Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Improve test_interpreters.test_stress definitions #152391

Copy link
Copy link

Description

@sobolevn
Issue body actions

There are several things that we can do better:

  1. Do not skip all tests if _interpreters module is missing
    # Raise SkipTest if subinterpreters not supported.
    _interpreters = import_helper.import_module('_interpreters')
    It is only needed for two tests
  2. Add @threading_helper.requires_working_threading() to
    @support.bigmemtest(size=200, memuse=32*2**20, dry_run=False)
    def test_create_many_threaded(self, size):
    alive = []
    start = threading.Event()
  3. Remove memhooks from
    def test_create_interpreter_no_memory(self):
    import _testcapi
    assertion = self.assertRaises(InterpreterError)
    _testcapi.set_nomemory(0, 1)
    with assertion:
    _interpreters.create()
    so they won't mess with the environment

I have a PR ready.

Linked PRs

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

Projects

Status
Done
Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

Morty Proxy This is a proxified and sanitized view of the page, visit original site.