aerospaceresearch / orbitdeterminator

determination of satellite orbits and more
MIT License
184 stars 113 forks source link

Code Unit Testing Philosophy #211

Open hornig opened 4 years ago

hornig commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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

spursbyte commented 3 years ago

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

hornig commented 3 years ago

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 commented 3 years ago

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

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 commented 3 years ago

Ok shubhank, thx. And now? :)

shubhank-saxena commented 3 years ago

Ok shubhank, thx. And now? :)

I am on it!

hornig commented 3 years ago

Ok shubhank, thx. And now? :)

I am on it!

works?