Skip to content

Commit 0d28e06

Browse files
committed
Fix: a few last edits from the review
1 parent 4152451 commit 0d28e06

File tree

2 files changed

+31
-5
lines changed

2 files changed

+31
-5
lines changed

tests/index.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,29 @@ package: unit tests, integration tests and end-to-end (or functional) tests. Lea
3636
:::
3737
::::
3838

39+
::::{grid-item}
40+
:::{card} ✨ Run tests locally ✨
41+
:link: test-types
42+
:link-type: doc
43+
:class-card: left-aligned
44+
45+
If you expect your users to use your package across different versions
46+
of Python, then using an automation tool such as nox to run your tests is useful. Learn about the various tools that you can use to run your tests across python versions here.
47+
:::
48+
::::
49+
50+
::::{grid-item}
51+
:::{card} ✨ Run tests online (using CI) ✨
52+
:link: test-types
53+
:link-type: doc
54+
:class-card: left-aligned
55+
56+
Continuous integration platforms such as GitHub actions can be
57+
useful for running your tests across both different Python versions
58+
and different operating systems. Learn about setting up tests to run in Continuous Integration here.
59+
:::
60+
::::
61+
3962
:::::
4063

4164

tests/run-tests.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
:og:title: Run tests for your Python package across Python versions
44
```
55

6-
# Run your tests
6+
# Run Python package tests
77

88
Running your tests is important to ensure that your package
99
is working as expected. It's good practice to consider that tests will run on your computer and your users' computers that may be running a different Python version and operating systems. Think about the following when running your tests:
@@ -155,6 +155,10 @@ Nox can also be used for other development tasks such as building
155155
documentation, creating your package distribution, and testing installations
156156
across both PyPI related environments (e.g. venv, virtualenv) and `conda` (e.g. `conda-forge`).
157157

158+
To get started with nox, you create a `noxfile.py` file at the root of your
159+
project directory. You then define commands using Python functions.
160+
Some examples of that are below.
161+
158162
## Test Environments
159163

160164
By default, `nox` uses the Python built in `venv` environment manager. A virtual environment (`venv`) is a self-contained Python environment that allows you to isolate and manage dependencies for different Python projects. It helps ensure that project-specific libraries and packages do not interfere with each other, promoting a clean and organized development environment.
@@ -199,6 +203,7 @@ Notice that below one single nox session allows you to run
199203
your tests on 4 different Python environments (Python 3.9, 3.10, 3.11, and 3.12).
200204

201205
```python
206+
# This code would live in a noxfile.py file located at the root of your project directory
202207
import nox
203208

204209
# For this to run you will need to have python3.9, python3.10 and python3.11 installed on your computer. Otherwise nox will skip running tests for whatever versions are missing
@@ -235,13 +240,11 @@ the various versions of Python that you need. You won't need to install all four
235240

236241
```{note}
237242
For `conda` to work with `nox`, you will need to
238-
install a conda-friendly version of Python. We suggest
239-
the mamba-forge installation.
240-
241-
More on that here...<link to tutorial??>
243+
ensure that either `conda` or `mamba` is installed on your computer.
242244
```
243245

244246
```python
247+
# This code should live in your noxfile.py file
245248
import nox
246249

247250
# The syntax below allows you to use mamba / conda as your environment manager, if you use this approach you don’t have to worry about installing different versions of Python

0 commit comments

Comments
 (0)