2021-10-01 07:18:38 +00:00
|
|
|
from maturin_starter import ExampleClass, PythonClass
|
2021-04-01 23:03:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
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
|
2021-10-01 07:18:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_doc() -> None:
|
|
|
|
import maturin_starter
|
|
|
|
|
|
|
|
assert (
|
|
|
|
maturin_starter.__doc__ == "An example module implemented in Rust using PyO3."
|
|
|
|
)
|