Skip to content

test(project): the #1851 no-requests test loads conda_vendor.py without the tomllib skip #1898

Closed

Description

@JarryShaw

tests/project/test_conda_platform_pin_refresh_1851.py::FetchTests::test_without_requests_only_the_request_fails, added by #1885, fails on the Python 3.8 (KTLO), Python 3.9 (KTLO) and Python 3.10 (KTLO) unit legs with ModuleNotFoundError: No module named 'tomllib'. Seen on #1896's head 3a7a1cd51, whose base is main c9b482355.

The test loads util/conda_vendor.py itself, through spec.loader.exec_module, and that module imports tomllib at module scope, which needs 3.11. The file's other tests reach the script through the loader at :71-73, which raises SkipTest without tomllib. This one bypasses it.

KTLO legs read green even when tests fail (#1679), so this shows only in the annotations and the log.

Fix: give the test the same tomllib skip as the rest of the file, and add a check that fails if a test in the file loads the script without that guard.

Activity

  1. added
    testPull requests that add or correct tests (test: subject prefix)
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 17, 2026
  2. added a commit that references this issue on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testPull requests that add or correct tests (test: subject prefix)wipWork in flight - a covering PR is open or an agent is actively on it

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions