Skip to content
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

Code Unit Testing Philosophy #211

Open
hornig opened this issue Oct 20, 2020 · 8 comments
Open

Code Unit Testing Philosophy #211

hornig opened this issue Oct 20, 2020 · 8 comments

Comments

@hornig
Copy link
Collaborator

hornig commented Oct 20, 2020

Hi,

I would like to start a discussion how we do unit testing.
I just saw now to testing approaches. One is with unittest[0] and one with pytest[1]

[0] https://github.com/aerospaceresearch/orbitdeterminator/blob/master/orbitdeterminator/doppler/tests/test_utils.py#L1
[1] https://github.com/aerospaceresearch/orbitdeterminator/blob/master/orbitdeterminator/tests/test_check_keplerian.py#L6

I would like to discuss two things:
which lib shall we take? I would like only to have one approach. that would make it easiert to understand and code for
and secondly, I would like to have only one central test folder. currently the gsoc structure has one of its own tests. shall me move it to the main one and re-name the test for "test_doppler_method"?

please discuss.

@PerezHz
Copy link
Contributor

PerezHz commented Oct 22, 2020

I'd personally prefer pytest over unittest, but I'm not sure if there's a reason why some tests use one or the other. I would also be in favor of having all tests in a single place, so moving the doppler tests to orbitdeterminator/tests/ seems to me like a good thing to do

@hornig
Copy link
Collaborator Author

hornig commented Oct 24, 2020

@apak-00 do you think we could re-code your test and use pytest?

@spursbyte
Copy link

I will like to work on this issue. Can you assign it to me?

@hornig
Copy link
Collaborator Author

hornig commented Mar 13, 2021

I will like to work on this issue. Can you assign it to me?

just start :). Me and @PerezHz will help. Either ask here or come to our Zulip chat :).

@shubhank-saxena
Copy link

Hello @hornig
I am a GSoC'21 aspirant. Here are some points that I feel could help-

  • Pytest has all the baseline features of unittest library. So pytest is always a plus thing for us.
  • Pytest can help us to integrate much more modules with it, like xdist(multiple cpu distribution library).
  • Pytest has some great integration with coverage libraries, which can help in near future when in need for analysing code coverage.

As for the central test folder is considered, I think it would be a good plan of action. Also if we want to (in near future) need to segregate type of tests and then run them according to our needs, with marks feature of pytest.

These are just some of my observations. Please do correct me if I am wrong anywhere. Thank you!

@hornig
Copy link
Collaborator Author

hornig commented Mar 15, 2021

Ok shubhank, thx.
And now? :)

@shubhank-saxena
Copy link

shubhank-saxena commented Mar 15, 2021

Ok shubhank, thx.
And now? :)

I am on it!

@hornig
Copy link
Collaborator Author

hornig commented Mar 26, 2021

Ok shubhank, thx.
And now? :)

I am on it!

works?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants