carpentries-incubator / carpentries-incubator/python-intermediate-development

Add information about additional helpful pytest features

Abierto
#372 0 comentarios 0 reacciones 0 asignados Ver en GitHub
ukaea-rse-team
Lenguaje dominante
TeX
Estrellas
63
Forks
77
Merge medio
20 h 8 min
PR fusionados (30 d)
3

Descripción

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?

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

El issue no indica ningún archivo de lección ni punto de entrada de los tests. Revisa primero el material existente del curso sobre pytest y parametrización, y después añade la guía opcional solicitada sobre ids, la selección de un subtest con -k entre comillas y -s/-x/-v; se considerará terminado cuando los ejemplos sean correctos y encajen con el alcance del curso.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
documentation, testing
Tipo de issue
Documentación
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
48/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.