We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da0807f commit 6013343Copy full SHA for 6013343
src/dtype.rs
@@ -826,7 +826,7 @@ mod tests {
826
827
use pyo3::{py_run, types::PyTypeMethods};
828
829
- use crate::npyffi::NPY_NEEDS_PYAPI;
+ use crate::npyffi::{is_numpy_2, NPY_NEEDS_PYAPI};
830
831
#[test]
832
fn test_dtype_new() {
@@ -855,7 +855,11 @@ mod tests {
855
dtype_bound::<T>(py).typeobj().qualname().unwrap()
856
}
857
Python::with_gil(|py| {
858
- assert_eq!(type_name::<bool>(py), "bool_");
+ if is_numpy_2(py) {
859
+ assert_eq!(type_name::<bool>(py), "bool");
860
+ } else {
861
+ assert_eq!(type_name::<bool>(py), "bool_");
862
+ }
863
864
assert_eq!(type_name::<i8>(py), "int8");
865
assert_eq!(type_name::<i16>(py), "int16");
0 commit comments