| 359 | #endif |
| 360 | |
| 361 | Status TestPythonDecimalToString() { |
| 362 | OwnedRef decimal_constructor_; |
| 363 | OwnedRef decimal_module; |
| 364 | |
| 365 | RETURN_NOT_OK(internal::ImportModule("decimal", &decimal_module)); |
| 366 | RETURN_NOT_OK( |
| 367 | internal::ImportFromModule(decimal_module.obj(), "Decimal", &decimal_constructor_)); |
| 368 | |
| 369 | std::string decimal_string("-39402950693754869342983"); |
| 370 | PyObject* python_object = |
| 371 | internal::DecimalFromString(decimal_constructor_.obj(), decimal_string); |
| 372 | ASSERT_NE(python_object, nullptr); |
| 373 | |
| 374 | std::string string_result; |
| 375 | ASSERT_OK(internal::PythonDecimalToString(python_object, &string_result)); |
| 376 | |
| 377 | return Status::OK(); |
| 378 | } |
| 379 | |
| 380 | Status TestInferPrecisionAndScale() { |
| 381 | OwnedRef decimal_constructor_; |
nothing calls this directly
no test coverage detected