Fix `test_tracy.py`'s and `test_search.py` tests from being brittle.
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 74/100
- Tipo di issue
- Refactoring
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- python
- Ambito
- testing-qa
Direzione di ricerca
Inizia con test_tracy.py's test_getSupervisors e test_search.py's test_getSupervisorsForDepartment, quindi esegui questi test per osservare le assunzioni su nomi fissi e conteggi fissi. Sostituisci queste aspettative fragili con assertions che rimangano valide quando vengono aggiunti Supervisors e conferma che entrambi i test passino con i dati demo attuali.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
The current implementation of the test_getSupervisors function, in test_tracy.py, checks if the people in the demo data are in a predetermined list.
This means that adding any new supervisor to the demo data breaks this test until it is set again. Create an implementation of this that does not require it to assert a predetermined list of supervisors.
test_getSupervisorsForDepartment, in test_search.py, is also a brittle function in this file. It checks the length of the list of supervisors compared to an expected outcome. This breaks whenever a new supervisor is added to the Computer Science (Department 1) department.
Notes:
The test_getSupervisors looks something like this: assert s.FIRST_NAME in ['Alex', 'Brian', ...] and assert s.CPO in ['222', '888', '6301', ...].
This doesn't test whether the function is grabbing new supervisors; it just checks whether the ones in the database are ALL grabbed when the query runs, which is why it crashes when a new supervisor is added.
The test_getSupervisorsForDepartment looks like this: assert len(supervisors) == 12
- Lingua principale
- Python
- Stelle
- 1
- Fork
- 1
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di BCStudentSoftwareDevTeam/lsf
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
BCStudentSoftwareDevTeam/lsf#572 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
BCStudentSoftwareDevTeam/lsf#675 ·
-
draft on hold
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
BCStudentSoftwareDevTeam/lsf#674 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 50/100
BCStudentSoftwareDevTeam/lsf#673 · 1 assegnatario ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
BCStudentSoftwareDevTeam/lsf#672 ·
Tutte le issue di BCStudentSoftwareDevTeam/lsf
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
stephrobert/dsoxlab#238 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
sublimehq/package_control#1780 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
nwg-piotr/nwg-displays#145 ·