()
| 37 | |
| 38 | #[test] |
| 39 | fn 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 | |
| 49 | py_class!(class EmptyClassInModule |py| { }); |
| 50 |