carpentries-incubator / carpentries-incubator/python-intermediate-development
Add information about additional helpful pytest features
- Vorherrschende Sprache
- TeX
- Sterne
- 63
- Forks
- 77
- Ø Merge
- 20 Std. 8 Min.
- Gemergte PRs (30 T.)
- 3
Beschreibung
In the course of a run of the course at UKAEA, the following feedback was collected:
- Recommend adding `ids` argument to `pytest.parameterise`, e.g. else you can have a test `my_test[1-2-None]` which is not very informative.
- Explaining how to run one sub-test (encourage quotes for cross-shell compatibility - zsh doesnt like without):
```sh
pytest -k "my_test[iteration-name]"
```
- Mention other useful opts?
- `-s` stdout
- `-x` terminate on first fail
- `-v` show each test by name
@kzscisoft I believe it might have been you to add this? Anything further you might add?
The usual concern is adding more material to an already lengthy course. However, perhaps this could be added as an "Optional" exercise for learners that are a little bit ahead?
Beitragsleitfaden
Rechercherichtung
Das Issue nennt keine Lesson-Datei oder keinen Test-Einstiegspunkt. Prüfe zuerst das vorhandene pytest- und Parametrisierungs-Material des Kurses und füge dann die angeforderte optionale Anleitung zu ids, zur Auswahl eines Sub-Tests mit in Anführungszeichen gesetztem -k sowie zu -s/-x/-v hinzu; fertig ist die Aufgabe, wenn die Beispiele korrekt sind und zum Umfang des Kurses passen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- documentation, testing
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 48/100