Currently, the unit tests use Python's standard library unittest, but this library is limited in features and doesn't allow for much modularity. The solution is to use pytest. instead, as many other open-source packages do.
Also, migrating the tests wouldn't be that hard as pytest already supports tests written for unittest. But we should change the structure of the tests nonetheless to utilize pytest's features. This would allow us to add tests easily later on. For example, instead of importing the Genius object from tests/__init__.py we should make the object a fixture declared in tests/conftest.py and rewrite the tests accordingly.
Currently, the unit tests use Python's standard library
unittest
, but this library is limited in features and doesn't allow for much modularity. The solution is to usepytest
. instead, as many other open-source packages do. Also, migrating the tests wouldn't be that hard aspytest
already supports tests written forunittest
. But we should change the structure of the tests nonetheless to utilizepytest
's features. This would allow us to add tests easily later on. For example, instead of importing theGenius
object fromtests/__init__.py
we should make the object a fixture declared intests/conftest.py
and rewrite the tests accordingly.