Skip to content

Commit

Permalink
Contributing: fix test command (#4482)
Browse files Browse the repository at this point in the history
Only "cargo test" does not run Python tests.
  • Loading branch information
birkenfeld authored Sep 1, 2024
1 parent 73fc844 commit 9eab260
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ nox -s docs -- open
#### Doctests

We use lots of code blocks in our docs. Run `cargo test --doc` when making changes to check that
the doctests still work, or `cargo test` to run all the tests including doctests. See
the doctests still work, or `cargo test` to run all the Rust tests including doctests. See
https://doc.rust-lang.org/rustdoc/documentation-tests.html for a guide on doctests.

#### Building the guide
Expand Down Expand Up @@ -86,16 +86,15 @@ Everybody is welcome to submit comments on open PRs. Please help ensure new PyO3

Here are a few things to note when you are writing PRs.

### Continuous Integration
### Testing and Continuous Integration

The PyO3 repo uses GitHub Actions. PRs are blocked from merging if CI is not successful. Formatting, linting and tests are checked for all Rust and Python code. In addition, all warnings in Rust code are disallowed (using `RUSTFLAGS="-D warnings"`).

Tests run with all supported Python versions with the latest stable Rust compiler, as well as for Python 3.9 with the minimum supported Rust version.

If you are adding a new feature, you should add it to the `full` feature in our *Cargo.toml** so that it is tested in CI.

You can run these tests yourself with
`nox`. Use `nox -l` to list the full set of subcommands you can run.
You can run these checks yourself with `nox`. Use `nox -l` to list the full set of subcommands you can run.

#### Linting Python code
`nox -s ruff`
Expand All @@ -110,7 +109,7 @@ You can run these tests yourself with
`nox -s clippy-all`

#### Tests
`cargo test --features full`
`nox -s test` or `cargo test` for Rust tests only, `nox -f pytests/noxfile.py -s test` for Python tests only

#### Check all conditional compilation
`nox -s check-feature-powerset`
Expand Down

0 comments on commit 9eab260

Please sign in to comment.