8000 Add ability of using kwargs in test functions by luisfpereira · Pull Request #1609 · geomstats/geomstats · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add ability of using kwargs in test functions #1609

New issue
8000

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

Merged
merged 3 commits into from
Jul 26, 2022

Conversation

luisfpereira
Copy link
Collaborator
@luisfpereira luisfpereira commented Jul 25, 2022

This change will allow to do something like:

def test_func(self, a, b, c=3):
  pass

This is achieved by changing the function signature to e.g. (self, a, b, c) and passing the default as data value if not encountered in the datum.

This feature is handy sometimes to reduce verbose in data creation.

@SaitejaUtpala
Copy link
Collaborator
SaitejaUtpala commented Jul 26, 2022

@LPereira95 Nice addition! I just have one comment. Once all thing are completed in testing end. I would suggest to write up how different pieces are interacting and how test data is built in flow chart so that if someone wants to look under hood or suggest improvement it becomes easy. We can probably put that on docs. Also congrats on merging giant PR #1517

@luisfpereira
Copy link
Collaborator Author

Thanks @SaitejaUtpala! I think it is a great suggestion and I'll definitely do it as soon as I finish the changes (there's still some ideas to be developed). Thank you also again for all the work you've put in developing this framework (very unique and powerful).

@luisfpereira luisfpereira changed the title Add ability of using kwargs in test functions (handy sometimes) Add ability of using kwargs in test functions Jul 26, 2022
@luisfpereira luisfpereira merged commit f53d7d0 into geomstats:master Jul 26, 2022
@luisfpereira luisfpereira deleted the test_kwargs branch September 19, 2022 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0