openassistant / oa-core

Open Assistant Core
http://openassistant.org
GNU General Public License v3.0
293 stars 77 forks source link

Begin writing unit testing. #36

Open ev3rl0ng opened 3 years ago

ev3rl0ng commented 3 years ago

Feature Request

Story

As a developer I want to write unit tests so that as we add new features / fix bugs in the code, individual pieces of the code are testable in an automated fashion.

Expected Benefits

Better quality code through regression prevention.

Considerations

To be fully effective in the cross-platform world we live in, the units tests would need to be run in multiple environments. Initially, we are only able to run them on the platform which the developer is developing. There is not a testing platform available to the project to run automated testing across multiple environments.

ev3rl0ng commented 3 years ago

@joshuashort do you have any preferences on what unit testing library we use here? I've got experience with both unittest and pytest. I like pytest's ability to parameterize a little better, but unittest has better support for objects imho.

joshuashort commented 3 years ago

I'd lean toward unittest, at least initially. It's nice to use builtins when possible. Probably not doctest though.. but maybe there's a world where that works 😄

ev3rl0ng commented 3 years ago

Sounds good to me!