-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor resolver tests, transition to PBT #296
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love that you moved those tests to a separate module and parametrized them with hypothesis!
a04fb54
to
e7443ab
Compare
Simplify parametrized tests Extract the different categories of dependencies in the parameters into their own lists/dicts: - non_locally_installed_deps - locally_installed_deps - user_defined_deps Define the toml-formatted user mapping from the user_defined_deps dict once Instead of manually definining the expected resolved dict of deps for each case, define a function that constructs this dict by taking advantage of the fact that the sets of deps extracted above are disjoint. Move resolver tests into a separate module Replace parameterized tests with PBT
No change to functionality
e7443ab
to
3725cef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work on this @Nour-Mws !
I think this PR is ready to be merged 🚀
If you anyway have some spare 10 minutes, please take a look at some simplification I propose in the branch maria/nour-simplified-refactor
. I described them commit by commit.
This refactor was done to make it easier to test the resolver with the boolean parameters
install_deps
andidentity_mapping
(in future PRs).Without this refactor, the list of parameterized cases for the resolver test will grow by a factor of 2 for each additional parameter. This would require manual maintenance and is increasingly hard to parse.