MCPcopy Create free account
hub / github.com/davidhewitt/pythonize / test_rename_round_trip

Function test_rename_round_trip

tests/test_structs.rs:98–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96
97#[test]
98fn test_rename_round_trip() {
99 Python::attach(|py| {
100 let original = WithRename {
101 first_name: "Bob".into(),
102 age: 30,
103 };
104 let py_obj = pythonize(py, &original).unwrap();
105 let result: WithRename = depythonize(&py_obj).unwrap();
106 assert_eq!(result, original);
107 });
108}
109
110// --- #[serde(rename_all = "camelCase")] ---
111

Callers

nothing calls this directly

Calls 2

pythonizeFunction · 0.85
depythonizeFunction · 0.85

Tested by

no test coverage detected