legorovers / pirover_simulator

A python based simulator for the 4tronix Inition and Pi2Go robots.
GNU General Public License v3.0
8 stars 40 forks source link

Add unit tests #20

Open Th0ught09 opened 2 months ago

Th0ught09 commented 2 months ago

Unit tests to ensure new code does not break existing functions as well as pre-commits to ensure all PR's are at the codebases standard before being accepted

For info on how pre-commits work please look at this

louiseadennis commented 2 months ago

This is a good idea, though unit tests for interfaces are challenging (though there is quite a bit of underlying stuff we could have simple unit tests for).

You've already got quite a few issues assigned to you - do you want to take this on as well, or leave it here and see if someone else wants to pick it up?

Th0ught09 commented 1 month ago

I'd like to take this on as well as #21, any other help from others will also be appreciated. I'll try update this issue with my progress if I am assigned

Th0ught09 commented 3 weeks ago

Small comment that I've found some free time and am working at this again and haven't forgotten, will try aim for a PR by sun

Th0ught09 commented 3 weeks ago

@louiseadennis I'm working a pre-commit formatter, however this will format all the files in the repo unfortunately. Would you like me to separate the unit tests and the pre-commit pr because of this? (I doubt it will have broken any of the code)

louiseadennis commented 3 weeks ago

I don't have a strong preference. I'd say probably best to separate the two, if it's not too much work, just to keep things conceptually modular, if you see what I mean...

Th0ught09 commented 3 weeks ago

Ah thank you, sorry for all the notifs but the unit tests will take a lot longer, didn't realise some of the functions would be such a pain to test sorry :sweat_smile: