MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_format_int_width_and_grouping

Function test_format_int_width_and_grouping

crates/common/src/format.rs:1539–1544  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1537
1538 #[test]
1539 fn test_format_int_width_and_grouping() {
1540 // issue #5922: width + comma grouping should pad left, not inside the number
1541 let spec = FormatSpec::parse("10,").unwrap();
1542 let result = spec.format_int(&BigInt::from(1234)).unwrap();
1543 assert_eq!(result, " 1,234"); // CPython 3.13.5
1544 }
1545
1546 #[test]
1547 fn test_format_int_padding_with_grouping() {

Callers

nothing calls this directly

Calls 3

format_intMethod · 0.80
parseFunction · 0.50
unwrapMethod · 0.45

Tested by

no test coverage detected