Skip to content

Don't run importlib tests for the "source" version #92328

Open
@FFY00

Description

@FFY00

Feature or enhancement

Simplify the test suite by not running the importlib tests on the source version, only the frozen one.

Pitch

Currently, we are running the tests against both the source and frozen versions of importlib.

Example:
https://github.com/python/cpython/blob/main/Lib/test/test_importlib/test_api.py#L97-L99

In #92265, we ran into a non-trivial issue where the frozen finders were leaking into source version of the tests, and I suspect some other tests might have the same issue. Me and @ericsnowcurrently spent quite a bit of time tracking it down, though I acknowledge it could have been easier for someone like Brett, who is more versed in this part of the code.

AFAICT, the only version of the modules users will actually use is the frozen one, making me question if the increased complexity in the test suite is worth it. I am under the impression that this was not always the case, which would explain a bit better why we are testing both versions.

So, would it be reasonable to simply remove the source version of the tests? What value is it actually providing? Did I overlook something here?

cc @brettcannon @ericsnowcurrently @warsaw

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions