pyo3/examples/setuptools-rust-starter/tests/test_setuptools_rust_starter.py
2021-10-01 09:05:58 +01:00

21 lines
454 B
Python

from setuptools_rust_starter import ExampleClass, PythonClass
def test_python_class() -> None:
py_class = PythonClass(value=10)
assert py_class.value == 10
def test_example_class() -> None:
example = ExampleClass(value=11)
assert example.value == 11
def test_doc() -> None:
import setuptools_rust_starter
assert (
setuptools_rust_starter.__doc__
== "An example module implemented in Rust using PyO3."
)