Add tox config for pyo3 itself
This commit is contained in:
parent
4da9110489
commit
38651a1827
4
Makefile
4
Makefile
|
@ -17,6 +17,6 @@ default: test
|
|||
|
||||
test:
|
||||
cargo test $(CARGO_FLAGS)
|
||||
pip install setuptools-rust pytest pytest-benchmark tox
|
||||
cd examples/word-count && python setup.py install && pytest -v tests
|
||||
pip install tox
|
||||
cd examples/word-count && tox
|
||||
cd examples/rustapi_module && tox
|
||||
|
|
|
@ -44,7 +44,8 @@
|
|||
//!
|
||||
//! let locals = PyDict::new(py);
|
||||
//! locals.set_item("os", py.import("os")?)?;
|
||||
//! let user: String = py.eval("os.getenv('USER') or os.getenv('USERNAME')", None, Some(&locals))?.extract()?;
|
||||
//! let code = "os.getenv('USER') or os.getenv('USERNAME') or 'Unknown'";
|
||||
//! let user: String = py.eval(code, None, Some(&locals))?.extract()?;
|
||||
//!
|
||||
//! println!("Hello {}, I'm Python {}", user, version);
|
||||
//! Ok(())
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
[tox]
|
||||
envlist = py27,
|
||||
py35,
|
||||
py36,
|
||||
py37,
|
||||
minversion = 3.4.0
|
||||
skip_missing_interpreters = true
|
||||
|
||||
[testenv]
|
||||
description = Run the unit tests under {basepython}
|
||||
skip_install = True
|
||||
usedevelop = True
|
||||
whitelist_externals = cargo
|
||||
commands = cargo test src/lib.rs
|
Loading…
Reference in New Issue