pyo3/pytests
Matthew Neeley 68ec6de0c9
Use single-arg form of `#[pymodule]` function in docs and tests (#3899)
* Use single-arg form for `#[pymodule]` functions in docs and tests

* Update guide/src/function.md

Co-authored-by: Icxolu <10486322+Icxolu@users.noreply.github.com>

* Add test of two-argument module function

* Fix new test

---------

Co-authored-by: Icxolu <10486322+Icxolu@users.noreply.github.com>
2024-02-28 22:36:50 +00:00
..
src Use single-arg form of `#[pymodule]` function in docs and tests (#3899) 2024-02-28 22:36:50 +00:00
tests support `Bound` for `classmethod` and `pass_module` (#3831) 2024-02-16 00:36:11 +00:00
Cargo.toml
MANIFEST.in
README.md
build.rs
noxfile.py
pyproject.toml

README.md

pyo3-pytests

An extension module built using PyO3, used to test and benchmark PyO3 from Python.

Testing

This package is intended to be built using maturin. Once built, you can run the tests using pytest:

pip install maturin
maturin develop
pytest

Alternatively, install nox and run the tests inside an isolated environment:

nox

Running benchmarks

You can install the module in your Python environment and then run the benchmarks with pytest:

pip install .
pytest --benchmark-enable

Or with nox:

nox -s bench