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

Function sequence

tests/test_class.rs:554–561  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

552
553#[test]
554fn sequence() {
555 let gil = Python::acquire_gil();
556 let py = gil.python();
557
558 let c = Sequence::create_instance(py).unwrap();
559 py_assert!(py, c, "list(c) == [0, 1, 2, 3, 4]");
560 py_assert!(py, c, "c['abc'] == 'abc'");
561}
562
563py_class!(class SequenceRef |py| {
564 def __getitem__(&self, key: &str) -> PyResult<String> {

Callers

nothing calls this directly

Calls 1

pythonMethod · 0.80

Tested by

no test coverage detected