FawltyDeps
FawltyDeps copied to clipboard
Test refactor
As we advance in the complexity of objects representing the FD domain, our test code also grows in complexity. It takes notably more time to change the test code base when changing the basic objects that are being tested.
We should:
- [ ] rethink the structure of tests, as discussed with the team, to test one feature at a time (for example change in
Location
object should not propagate to all tests usingUndeclaredDependencies
) - [x] gather common helper functions in
utils.py
and refactor tests cases to use them - [ ] Use more fixtures not to repeat test cases between tests files and/or generate test cases automatically
- [x] Consider using objects with reasonable defaults for
pytest.param
inputs (test in `compare_imports_to_dependencies) have now 5 variables, for which most is just an empty list - [x] (may be a separate issue) Consider using
hypothesis
for property-based testing