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

Function empty_class_with_new

tests/test_class.rs:82–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

80
81#[test]
82fn empty_class_with_new() {
83 let gil = Python::acquire_gil();
84 let py = gil.python();
85 let typeobj = py.get_type::<EmptyClassWithNew>();
86 assert!(typeobj
87 .call(py, NoArgs, None)
88 .unwrap()
89 .cast_into::<EmptyClassWithNew>(py)
90 .is_ok());
91}
92
93py_class!(class NewWithOneArg |py| {
94 data _data: i32;

Callers

nothing calls this directly

Calls 1

pythonMethod · 0.80

Tested by

no test coverage detected