pythonize icon indicating copy to clipboard operation
pythonize copied to clipboard

test_nested_struct

Open bit-web24 opened this issue 1 year ago • 2 comments
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"}}"#,
        )
    }

bit-web24 avatar Jul 18 '24 19:07 bit-web24

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.

codecov[bot] avatar Jul 19 '24 16:07 codecov[bot]

@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"

MarshalX avatar Jul 22 '24 09:07 MarshalX

Understood, let's merge here and I can resolve separately 👍

davidhewitt avatar Aug 03 '24 13:08 davidhewitt