Run the tests (requires a compiler).
(session: nox.Session)
| 32 | |
| 33 | @nox.session |
| 34 | def tests(session: nox.Session) -> None: |
| 35 | """ |
| 36 | Run the tests (requires a compiler). |
| 37 | """ |
| 38 | tmpdir = session.create_tmp() |
| 39 | session.install("cmake") |
| 40 | session.install("-r", "tests/requirements.txt") |
| 41 | session.run( |
| 42 | "cmake", |
| 43 | "-S.", |
| 44 | f"-B{tmpdir}", |
| 45 | "-DPYBIND11_WERROR=ON", |
| 46 | "-DDOWNLOAD_CATCH=ON", |
| 47 | "-DDOWNLOAD_EIGEN=ON", |
| 48 | *session.posargs, |
| 49 | ) |
| 50 | session.run("cmake", "--build", tmpdir) |
| 51 | session.run("cmake", "--build", tmpdir, "--config=Release", "--target", "check") |
| 52 | |
| 53 | |
| 54 | @nox.session |