MCPcopy Index your code
hub / github.com/davidhewitt/pythonize / test_de_with_obj

Function test_de_with_obj

src/de.rs:676–685  ·  view source on GitHub ↗
(obj: &Bound<'_, PyAny>, expected: &T, expected_json: &JsonValue)

Source from the content-addressed store, hash-verified

674 }
675
676 fn test_de_with_obj<T>(obj: &Bound<'_, PyAny>, expected: &T, expected_json: &JsonValue)
677 where
678 T: de::DeserializeOwned + PartialEq + std::fmt::Debug,
679 {
680 let actual: T = depythonize(obj).unwrap();
681 assert_eq!(&actual, expected);
682
683 let actual_json: JsonValue = depythonize(obj).unwrap();
684 assert_eq!(&actual_json, expected_json);
685 }
686
687 #[test]
688 fn test_empty_struct() {

Callers 2

test_deFunction · 0.85
test_dataclassFunction · 0.85

Calls 1

depythonizeFunction · 0.85

Tested by

no test coverage detected