pythonize
pythonize copied to clipboard
test_nested_struct
trafficstars
Added testcase for serializing nested struct.
#[test]
fn test_nested_struct() {
#[derive(Serialize)]
struct Foo {
name: String,
bar: Bar,
}
#[derive(Serialize)]
struct Bar {
name: String,
}
test_ser(
Foo {
name: "foo".to_string(),
bar: Bar {
name: "bar".to_string(),
},
},
r#"{"name":"foo","bar":{"name":"bar"}}"#,
)
}
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 80.81%. Comparing base (
c29579f) to head (dd0beb9).
Additional details and impacted files
@@ Coverage Diff @@
## main #68 +/- ##
==========================================
+ Coverage 80.41% 80.81% +0.39%
==========================================
Files 3 3
Lines 1062 1084 +22
Branches 1062 1084 +22
==========================================
+ Hits 854 876 +22
Misses 160 160
Partials 48 48
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@davidhewitt CI fails on macOS for lower Python versions. I think because of "macos-latest" which was bumped recently and now uses M1-powered runners. Which is ARM. To fix arch compatibility we can simply move to the runner "macos-13"
Understood, let's merge here and I can resolve separately 👍