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

Function test_all

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

Source from the content-addressed store, hash-verified

1429
1430 #[test]
1431 fn test_all() {
1432 let expected = Ok(FormatSpec {
1433 conversion: None,
1434 fill: Some('<'.into()),
1435 align: Some(FormatAlign::Right),
1436 sign: Some(FormatSign::Minus),
1437 alternate_form: true,
1438 width: Some(23),
1439 grouping_option: Some(FormatGrouping::Comma),
1440 precision: Some(11),
1441 format_type: Some(FormatType::Binary),
1442 });
1443 assert_eq!(FormatSpec::parse("<>-#23,.11b"), expected);
1444 }
1445
1446 fn format_bool(text: &str, value: bool) -> Result<String, FormatSpecError> {
1447 FormatSpec::parse(text).and_then(|spec| spec.format_bool(value))

Callers

nothing calls this directly

Calls 1

SomeClass · 0.50

Tested by

no test coverage detected