Skip to content

Comments

test: Strip whitespace when comparing numpy dtypes for 1.22 compat#3682

Merged
henryiii merged 2 commits intopybind:masterfrom
mgorny:strip-numpy-ws
Feb 3, 2022
Merged

test: Strip whitespace when comparing numpy dtypes for 1.22 compat#3682
henryiii merged 2 commits intopybind:masterfrom
mgorny:strip-numpy-ws

Conversation

@mgorny
Copy link
Contributor

@mgorny mgorny commented Feb 3, 2022

Description

Strip whitespace when comparing numpy dtype str() in order to preserve
test compatibility with both numpy 1.22 and older versions whose output
differ by whitespace.

Fixes #3680

Suggested changelog entry:

* Fix test failures with numpy 1.22 by ignoring whitespace when comparing `str()` of dtypes. `#3682 <https://github.com/pybind/pybind11/pull/3682>`_

mgorny and others added 2 commits February 3, 2022 17:43
Strip whitespace when comparing numpy dtype str() in order to preserve
test compatibility with both numpy 1.22 and older versions whose output
differ by whitespace.

Fixes pybind#3680
@henryiii henryiii merged commit 1d3b04e into pybind:master Feb 3, 2022
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Feb 3, 2022
@henryiii henryiii removed the needs changelog Possibly needs a changelog entry label Mar 29, 2022
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.

[BUG]: test failures with numpy 1.22.1

2 participants