MCPcopy Create free account
hub / github.com/PyO3/pyo3 / test_pymodule_init_with_only_python

Function test_pymodule_init_with_only_python

tests/test_declarative_module.rs:350–360  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

348
349#[test]
350fn test_pymodule_init_with_only_python() {
351 Python::attach(|py| {
352 let m = pyo3::wrap_pymodule!(module_with_py_init)(py);
353 let m = m.bind(py);
354 py_assert!(py, m, "m.quintuple(3) == 15");
355 assert_eq!(
356 PY_INIT_VERSION_MAJOR.load(Ordering::SeqCst),
357 py.version_info().major
358 );
359 })
360}
361
362#[pymodule]
363mod module_with_py_and_module_init {

Callers

nothing calls this directly

Calls 1

bindMethod · 0.80

Tested by

no test coverage detected