Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions newsfragments/5352.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fill `PyTypeInfo::NAME` with Pythonic values (e.g. BasedException) instead of C ones (e.g. PyBasedException)
14 changes: 7 additions & 7 deletions src/conversions/jiff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -533,31 +533,31 @@ mod tests {
let none = py.None().into_bound(py);
assert_eq!(
none.extract::<Span>().unwrap_err().to_string(),
"TypeError: 'NoneType' object cannot be converted to 'PyDelta'"
"TypeError: 'NoneType' object cannot be converted to 'timedelta'"
);
assert_eq!(
none.extract::<Offset>().unwrap_err().to_string(),
"TypeError: 'NoneType' object cannot be converted to 'PyTzInfo'"
"TypeError: 'NoneType' object cannot be converted to 'tzinfo'"
);
assert_eq!(
none.extract::<TimeZone>().unwrap_err().to_string(),
"TypeError: 'NoneType' object cannot be converted to 'PyTzInfo'"
"TypeError: 'NoneType' object cannot be converted to 'tzinfo'"
);
assert_eq!(
none.extract::<Time>().unwrap_err().to_string(),
"TypeError: 'NoneType' object cannot be converted to 'PyTime'"
"TypeError: 'NoneType' object cannot be converted to 'time'"
);
assert_eq!(
none.extract::<Date>().unwrap_err().to_string(),
"TypeError: 'NoneType' object cannot be converted to 'PyDate'"
"TypeError: 'NoneType' object cannot be converted to 'date'"
);
assert_eq!(
none.extract::<DateTime>().unwrap_err().to_string(),
"TypeError: 'NoneType' object cannot be converted to 'PyDateTime'"
"TypeError: 'NoneType' object cannot be converted to 'datetime'"
);
assert_eq!(
none.extract::<Zoned>().unwrap_err().to_string(),
"TypeError: 'NoneType' object cannot be converted to 'PyDateTime'"
"TypeError: 'NoneType' object cannot be converted to 'datetime'"
);
});
}
Expand Down
Loading
Loading