Fix `test_tracy.py`'s and `test_search.py` tests from being brittle.
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- python
- Domain
- testing-qa
Research direction
Start with test_tracy.py's test_getSupervisors and test_search.py's test_getSupervisorsForDepartment, then run those tests to observe the fixed-name and fixed-count assumptions. Replace those brittle expectations with assertions that remain valid when supervisors are added, and confirm both tests pass with the current demo data.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Python
- Stars
- 1
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from BCStudentSoftwareDevTeam/lsf
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
BCStudentSoftwareDevTeam/lsf#572 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
BCStudentSoftwareDevTeam/lsf#675 ·
-
draft on hold
Difficulty 3/5 1-2 days Newbie friendliness 55/100
BCStudentSoftwareDevTeam/lsf#674 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 50/100
BCStudentSoftwareDevTeam/lsf#673 · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
BCStudentSoftwareDevTeam/lsf#672 ·
All issues in BCStudentSoftwareDevTeam/lsf
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100