Merge pull request #1159 from alex/patch-1
Don't run a test of PyFloat_AS_DOUBLE when using the limited API
This commit is contained in:
commit
05d86b76f8
|
@ -81,6 +81,7 @@ impl<'source> FromPyObject<'source> for f32 {
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
|
#[cfg(not(Py_LIMITED_API))]
|
||||||
use crate::ffi::PyFloat_AS_DOUBLE;
|
use crate::ffi::PyFloat_AS_DOUBLE;
|
||||||
use crate::{AsPyPointer, Python, ToPyObject};
|
use crate::{AsPyPointer, Python, ToPyObject};
|
||||||
|
|
||||||
|
@ -103,6 +104,7 @@ mod test {
|
||||||
num_to_py_object_and_back!(to_from_f32, f32, f32);
|
num_to_py_object_and_back!(to_from_f32, f32, f32);
|
||||||
num_to_py_object_and_back!(int_to_float, i32, f64);
|
num_to_py_object_and_back!(int_to_float, i32, f64);
|
||||||
|
|
||||||
|
#[cfg(not(Py_LIMITED_API))]
|
||||||
#[test]
|
#[test]
|
||||||
fn test_as_double_macro() {
|
fn test_as_double_macro() {
|
||||||
use assert_approx_eq::assert_approx_eq;
|
use assert_approx_eq::assert_approx_eq;
|
||||||
|
|
Loading…
Reference in a new issue