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 20ad58c commit eb6feb5Copy full SHA for eb6feb5
tests/to_py.rs
@@ -74,14 +74,12 @@ fn usize_dtype() {
74
75
let a: Vec<usize> = vec![1, 2, 3];
76
let x = a.into_pyarray(py);
77
- let x_repr = format!("{:?}", x);
78
79
- let x_repr_expected = if cfg!(target_pointer_width = "64") {
80
- "array([1, 2, 3], dtype=uint64)"
+ if cfg!(target_pointer_width = "64") {
+ pyo3::py_run!(py, x, "assert str(x.dtype) == 'uint64'")
81
} else {
82
- "array([1, 2, 3], dtype=uint32)"
+ pyo3::py_run!(py, x, "assert str(x.dtype) == 'uint32'")
83
};
84
- assert_eq!(x_repr, x_repr_expected);
85
}
86
87
#[test]
0 commit comments