Skip to content

test(corekit): test_sentinel_exports_unit fails 5 tests in the corekit unittest leg #1332

Closed

Description

@JarryShaw

Describe the bug
tests/corekit/test_sentinel_exports_unit.py fails 5 times when it runs inside the corekit unittest leg, but passes on its own under pytest. Three failures are in SentinelExportTests.test_star_import_hands_back_the_canonical_object and two in NoValueIsTheDocumentedFieldDefaultTests. The pattern matches #1065: an object imported at module level goes stale once an earlier module re-imports pcapkit, so assertIs against the sentinel fails.

To Reproduce
On main (11ae68ebf), python util/run_unittest_leg.py corekit reports 593 test(s), 5 failure(s), 0 error(s). I re-ran it.

Expected behavior
The module uses reimport_once_per_class and imports what it needs inside each test, so that it passes in any order. CI does not run a corekit leg, which is why this has gone unnoticed.

Found by the #1254 worker and its cross-review.

Activity

  1. added
    testPull requests that add or correct tests (test: subject prefix)
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 7, 2026
  2. added
    wipWork in flight - a covering PR is open or an agent is actively on it
    and removed
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 7, 2026
  3. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 8, 2026
  4. added this to the PyPCAPKit v1.5 milestone on Oct 26, 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)

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions