MCPcopy Create free account
hub / github.com/dgrunwald/rust-cpython / test_len

Function test_len

src/objects/tuple.rs:243–249  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

241
242 #[test]
243 fn test_len() {
244 let gil = Python::acquire_gil();
245 let py = gil.python();
246 let tuple = (1, 2, 3).to_py_object(py);
247 assert_eq!(3, tuple.len(py));
248 assert_eq!((1, 2, 3), tuple.into_object().extract(py).unwrap());
249 }
250}

Callers

nothing calls this directly

Calls 2

pythonMethod · 0.80
to_py_objectMethod · 0.45

Tested by

no test coverage detected