Skip to content

test.test_capi.test_watchers makes assumptions about available watcher IDs #162473

Done

Description

@alexmalyshev

There's a number of tests (test.test_capi.test_watchers.TestTypeWatchers.test_error, test.test_capi.test_watchers.TestTypeWatchers.test_watch_unassigned_watcher_id, etc.) which assume that watcher IDs 1 and 3 are available for use, and hardcode them.

When running these tests with CinderX, they fail because CinderX installs watchers on import, and that changes what IDs are available.

We can make these tests more general by generating IDs that are guaranteed to be unused, by creating a watcher then immediately clearing it.

Linked PRs

Activity

  1. added
    type-feature
    tests
    on Nov 23, 2026
  2. added a commit that references this issue on Dec 4, 2026
  3. added 2 commits that reference this issue on Dec 4, 2026
  4. removed
    type-feature
    on Dec 4, 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

    tests

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions