FawltyDeps icon indicating copy to clipboard operation
FawltyDeps copied to clipboard

Test refactor

Open mknorps opened this issue 2 years ago • 4 comments

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 using UndeclaredDependencies)
  • [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

mknorps avatar Feb 18 '23 13:02 mknorps