Skip to content

Commit

Permalink
Improve readability of Testing the final integration in Python
Browse files Browse the repository at this point in the history
  • Loading branch information
MusicalNinjaDad committed Apr 21, 2024
1 parent 023af31 commit 674a850
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions guide/src/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,19 @@ def test_one_plus_one ():
assert addone(1) == 2
```

Before you can execute this test, you need to compile and install your rust library. The easiest way
to do this, with both maturin and setuptools-rust is to run `pip install -e .` in the root of your
Python package which will build and install the package in editable mode. (If you have additional
dependencies for development, e.g.: pytest, then you will need to install these as well, or include
them as optional dependencies in `pyproject.toml` and run `pip install -e .[dev]`for example).
Before you can execute this test, you need to compile and install your rust library.

The easiest way to do this, with both maturin and setuptools-rust is to run `pip install -e .` in the
root of your Python package. This will build and install the package in editable mode.

Note: If you have additional dependencies for development, e.g.: pytest, then you will need to install
these manually, or include them as optional dependencies in `pyproject.toml` e.g.:

```toml
[project.optional-dependencies]
dev = [
"pytest",
]
```

and then run `pip install -e .[dev]`

0 comments on commit 674a850

Please sign in to comment.