()
| 348 | |
| 349 | #[test] |
| 350 | fn 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] |
| 363 | mod module_with_py_and_module_init { |