mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Fix tests
This commit is contained in:
1 parent
32cf0185bd
commit
3677013765
1 file changed
+28
-7
+28
-7
@@ -1104,13 +1104,34 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_format_invalid_specification() {
|
||||
assert_eq!(FormatSpec::parse("%3"), Err("Invalid format specifier"));
|
||||
assert_eq!(FormatSpec::parse(".2fa"), Err("Invalid format specifier"));
|
||||
assert_eq!(FormatSpec::parse("ds"), Err("Invalid format specifier"));
|
||||
assert_eq!(FormatSpec::parse("x+"), Err("Invalid format specifier"));
|
||||
assert_eq!(FormatSpec::parse("b4"), Err("Invalid format specifier"));
|
||||
assert_eq!(FormatSpec::parse("o!"), Err("Invalid format specifier"));
|
||||
assert_eq!(FormatSpec::parse("d "), Err("Invalid format specifier"));
|
||||
assert_eq!(
|
||||
FormatSpec::parse("%3"),
|
||||
Err("Invalid format specifier".to_owned())
|
||||
);
|
||||
assert_eq!(
|
||||
FormatSpec::parse(".2fa"),
|
||||
Err("Invalid format specifier".to_owned())
|
||||
);
|
||||
assert_eq!(
|
||||
FormatSpec::parse("ds"),
|
||||
Err("Invalid format specifier".to_owned())
|
||||
);
|
||||
assert_eq!(
|
||||
FormatSpec::parse("x+"),
|
||||
Err("Invalid format specifier".to_owned())
|
||||
);
|
||||
assert_eq!(
|
||||
FormatSpec::parse("b4"),
|
||||
Err("Invalid format specifier".to_owned())
|
||||
);
|
||||
assert_eq!(
|
||||
FormatSpec::parse("o!"),
|
||||
Err("Invalid format specifier".to_owned())
|
||||
);
|
||||
assert_eq!(
|
||||
FormatSpec::parse("d "),
|
||||
Err("Invalid format specifier".to_owned())
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in new issue
Block a user