-
Notifications
You must be signed in to change notification settings - Fork 10
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: split test contact.py #369
Conversation
…thub.com/DeepRank/deeprank-core into 304_UniformDocString_trainer.py_joyceljy
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.
Thanks for picking this up, Joyce! It is much more clearly organized into groups the way you now split the tests up.
Ideally, you could split them up even further into individual tests. Pretty much each time there's a comment block saying what is being tested, it could be a single test function. You can then use what is now in the comment as a docstring for that test.
Because most of the tests will be essentially similar, where mainly the inputs and assert statements will change, you can create a sort of helper function that contains the main body of the test, and then call this function with a different input each time.
Also, don't forget to tag which issue you will be closing with this PR ;)
Let me know (on Teams) if it's unclear what I mean with this or if you need help, and I can explain it better.
Update: |
…e_tests_dbodor refactor: test_contact.py function naming and output
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.
you can go ahead and merge :)
I split the original test in features/test_contact.py into four smaller tests.
They were test_vanderwaals(), test_attractive_electrostatic(), test_repulsive_electrostatic() and test_cal_residue_contact().