JMU-CS / JMU-CS/jmu_python_gradescope_utils
Automatically generate hints that show test inputs
- Lingua principale
- Python
- Stelle
- 2
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Another idea from today's meeting. We have a lot of test code like this:
``` py
actual = addressing.generate_addresses("Carrier Drive", 1000, 1030, 10)
self.assertEquals(['1000 Carrier Drive', '1010 Carrier Drive', '1020 Carrier Drive'],
actual, msg='generate_addresses("Carrier Drive", 1000, 1030, 10)')
```
We could write new methods (Ex: `assertEqualHint`) that takes `function`, `args` (as a tuple), and `expected` as parameters, generates the `msg` automatically, calls the function with the given arguments, and then does the assertion. That would also make giving consistent and correct feedback easier. Sometimes instructors accidentally do (expected, actual) based on JUnit, which is confusing, because students think the expected value is what their function returned.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia esaminando le utilità di asserzione e i test esistenti del repository, quindi definisci come un helper debba accettare una funzione, una tupla di argomenti e un valore atteso. Il lavoro è completato quando l’helper genera un messaggio coerente contenente gli input del test, invoca la funzione e segnala le asserzioni con i valori atteso ed effettivo nell’ordine previsto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- testing-qa
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100