Skip to content

Commit 8f4b247

Browse files
committed
make sure expected values are interpreted as doubles
1 parent eb35eac commit 8f4b247

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/_testcapimodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2309,7 +2309,7 @@ test_string_to_double(PyObject *self) {
23092309
result = PyOS_string_to_double(STR, NULL, NULL); \
23102310
if (result == -1.0 && PyErr_Occurred()) \
23112311
return NULL; \
2312-
if (result != expected) { \
2312+
if (result != (double)expected) { \
23132313
msg = "conversion of " STR " to float failed"; \
23142314
goto fail; \
23152315
}

0 commit comments

Comments
 (0)