From 4000c1a86a77f2faf655f2e3f409d1303d25dc06 Mon Sep 17 00:00:00 2001 From: Dorian Pula Date: Wed, 6 Feb 2019 09:04:04 -0500 Subject: [PATCH] Add instructions and test for running against pytest. --- README.md | 3 +++ test.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 72c0213..43c14b1 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,13 @@ Insure the following dependencies are in place: * Install using `rustup toolchain install nightly` * Set default toolchain `rustup default nightly` * Python 3 Development headers (python3-dev in Ubuntu) +* pipenv `pip install --user pipenv` ## Running the Python example 1. Build the rust crate first: `cargo build` +1. Create the Python package with: `pyo3 develop` +1. Run the tests: `pytest test.py` ## Documentation diff --git a/test.py b/test.py index 793b05c..b45758e 100644 --- a/test.py +++ b/test.py @@ -1,2 +1,5 @@ import unit_converter + +def test_using_unit_converter(): + assert unit_converter.convert_celsius_to_fahrenheit(25.0) == 77.0