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

Function iterator

tests/test_class.rs:447–454  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

445
446#[test]
447fn iterator() {
448 let gil = Python::acquire_gil();
449 let py = gil.python();
450
451 let inst = Iterator::create_instance(py, RefCell::new(Box::new(5..8))).unwrap();
452 py_assert!(py, inst, "iter(inst) is inst");
453 py_assert!(py, inst, "list(inst) == [5, 6, 7]");
454}
455
456py_class!(class StringMethods |py| {
457 def __str__(&self) -> PyResult<&'static str> {

Callers

nothing calls this directly

Calls 1

pythonMethod · 0.80

Tested by

no test coverage detected