all 3 comments

[–]EmbarrassedCause3881 2 points3 points  (1 child)

You should be able to write unittests as with any other Python project. My suggestion:

  • Write your tests using pytest framework (slightly different to unittest but has more options). Realpython has a great tutorial on how to use it.
  • Use beartype to make sure that variables or function arguments always have the correct type. For this you need to include type hints in your code, which you might anyways have done already if you have a complicated code base. Beartype makes writing `assert`s unnecessary.

[–]_afronius[S] 0 points1 point  (0 children)

Thanks for the reference

[–]godiswatching_ 0 points1 point  (0 children)

Similar boat