Skip to content

Make borrow-state tests portable on 32-bit targets - #566

Open
heiserhorn wants to merge 1 commit into
PyO3:mainfrom
heiserhorn:fix-borrow-state-32-bit
Open

Make borrow-state tests portable on 32-bit targets#566
heiserhorn wants to merge 1 commit into
PyO3:mainfrom
heiserhorn:fix-borrow-state-32-bit

Conversation

@heiserhorn

Copy link
Copy Markdown

Fixes #565.

The borrow-state tests assert exact values of the process-global borrow-flag count. On Debian i386, the no-feature test suite can observe an additional registered flag and fail even though the array-count and safety checks remain valid.

Gate the exact n_flags state and assertions on 64-bit targets while retaining the other borrow-state checks on all architectures. This keeps the test meaningful without requiring a platform-dependent global registry count on 32-bit systems.

Validation:

  • cargo test --lib borrow::shared::tests::borrow_multiple_arrays passed.
  • git diff --check passed.
  • Debian's rust-numpy 0.28.0-4 i386 sbuild passed with the equivalent packaging patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make borrow-state tests portable to 32-bit targets

1 participant