From c868cc3e4bb6b22c3a1149df1121c28cfecb2d7c Mon Sep 17 00:00:00 2001 From: konstin Date: Fri, 1 Feb 2019 16:31:18 +0100 Subject: [PATCH] Fix test --- Makefile | 6 +++++- examples/rustapi_module/tests/test_datetime.py | 2 +- tests/test_module.rs | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index d56ee220..8c1b7d8d 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,11 @@ test: cargo test cargo clippy tox - for example in examples/*; do tox -e py --workdir $$example; done + for example in examples/*; do tox -e py -c $$example/tox.ini; done + +test_py3: + tox -e py3 + for example in examples/*; do tox -e py3 -c $$example/tox.ini; done publish: cargo test diff --git a/examples/rustapi_module/tests/test_datetime.py b/examples/rustapi_module/tests/test_datetime.py index 5014de2a..8114a925 100644 --- a/examples/rustapi_module/tests/test_datetime.py +++ b/examples/rustapi_module/tests/test_datetime.py @@ -296,4 +296,4 @@ def test_tz_class_introspection(): tzi = rdt.TzClass() assert tzi.__class__ == rdt.TzClass - assert repr(tzi).startswith(" usize { #[pymodule] #[cfg(Py_3)] fn module_with_functions(py: Python, m: &PyModule) -> PyResult<()> { - use pyo3::{wrap_pyfunction, wrap_pymodule}; + use pyo3::wrap_pyfunction; #[pyfn(m, "sum_as_string")] fn sum_as_string_py(_py: Python, a: i64, b: i64) -> PyResult {