pyo3/pytests
Aneesh Agrawal c67625d683
Revamp PyType name functions to match PEP 737 (#4196)
* Revamp PyType name functions to match PEP 737

PyType::name uses `tp_name`, which is not consistent.
[PEP 737](https://peps.python.org/pep-0737/) adds a new path forward,
so update PyType::name and add PyType::{module,fully_qualified_name}
to match the PEP.

* refactor conditional code to handle multiple Python versions better

* return `Bound<'py, str>`

* fixup

---------

Co-authored-by: David Hewitt <mail@davidhewitt.dev>
2024-06-22 22:10:27 +00:00
..
src Revamp PyType name functions to match PEP 737 (#4196) 2024-06-22 22:10:27 +00:00
tests Revamp PyType name functions to match PEP 737 (#4196) 2024-06-22 22:10:27 +00:00
Cargo.toml ci: move lints to new 1.74 cargo.toml tables 2023-11-17 15:41:52 +00:00
MANIFEST.in pytests: merge benchmark and test crates 2022-02-05 10:16:46 +00:00
README.md pytests: merge benchmark and test crates 2022-02-05 10:16:46 +00:00
build.rs pytests: merge benchmark and test crates 2022-02-05 10:16:46 +00:00
noxfile.py ci: start testing on 3.13-dev (#4184) 2024-05-25 22:41:26 +00:00
pyproject.toml ci: start testing on 3.13-dev (#4184) 2024-05-25 22:41:26 +00:00

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