python / python/cpython

`test_import` sometimes fails in "Hypothesis tests on Ubuntu" job

Open
#131,229 3 comments 0 reactions 1 assignee View on GitHub

@ericsnowcurrently is already working on this.

Since Apr 9, 2025.

tests topic-importlib topic-subinterpreters type-bug
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

This is not the first time I see this, but the first time I decided to report it :)

======================================================================
FAIL: test_basic_multiple_interpreters_deleted_no_reset (test.test_import.SinglephaseInitTests.test_basic_multiple_interpreters_deleted_no_reset)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/support/__init__.py", line 1270, in wrapper
    func(self)
    ~~~~^^^^^^
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/test_import/__init__.py", line 3285, in test_basic_multiple_interpreters_deleted_no_reset
    self.check_copied(loaded_interp1, base)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/test_import/__init__.py", line 2948, in check_copied
    self.assertNotEqual(snap.id, base.snapshot.id)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 140557519167152 == 140557519167152

----------------------------------------------------------------------

Link: https://github.com/python/cpython/actions/runs/13854070641/job/38766894924?pr=131220

Linked PRs
  • gh-141552

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.