| 427 | } |
| 428 | |
| 429 | Status TestInferAllLeadingZeros() { |
| 430 | OwnedRef decimal_constructor_; |
| 431 | OwnedRef decimal_module; |
| 432 | |
| 433 | RETURN_NOT_OK(internal::ImportModule("decimal", &decimal_module)); |
| 434 | RETURN_NOT_OK( |
| 435 | internal::ImportFromModule(decimal_module.obj(), "Decimal", &decimal_constructor_)); |
| 436 | |
| 437 | std::string decimal_string("0.001"); |
| 438 | PyObject* python_decimal = |
| 439 | internal::DecimalFromString(decimal_constructor_.obj(), decimal_string); |
| 440 | |
| 441 | internal::DecimalMetadata metadata; |
| 442 | ASSERT_OK(metadata.Update(python_decimal)); |
| 443 | ASSERT_EQ(3, metadata.precision()); |
| 444 | ASSERT_EQ(3, metadata.scale()); |
| 445 | |
| 446 | return Status::OK(); |
| 447 | } |
| 448 | |
| 449 | Status TestInferAllLeadingZerosExponentialNotationPositive() { |
| 450 | OwnedRef decimal_constructor_; |
nothing calls this directly
no test coverage detected