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

Function empty_class

tests/test_class.rs:39–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37
38#[test]
39fn empty_class() {
40 let gil = Python::acquire_gil();
41 let py = gil.python();
42 let typeobj = py.get_type::<EmptyClass>();
43 // By default, don't allow creating instances from python.
44 assert!(typeobj.call(py, NoArgs, None).is_err());
45
46 py_assert!(py, typeobj, "typeobj.__name__ == 'EmptyClass'");
47}
48
49py_class!(class EmptyClassInModule |py| { });
50

Callers

nothing calls this directly

Calls 1

pythonMethod · 0.80

Tested by

no test coverage detected