Skip to content

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

Open

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

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

    testsTests in the Lib/test dirtype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions