Functionality of doculog relies on git. This makes it difficult to unit test because git cannot, as far as I know, easily have its behaviour altered/mocked for unit tests. It is possible to mock the responses to subprocess calls (which invoke git), but this requires the test writer to create a string of git log/diff output and isn't scalable.
We need to find a way to mock git behaviour for unit testing. I.e. start a git repo local to that test / test suite, easily add commits and tags.
Functionality of doculog relies on git. This makes it difficult to unit test because git cannot, as far as I know, easily have its behaviour altered/mocked for unit tests. It is possible to mock the responses to
subprocesscalls (which invoke git), but this requires the test writer to create a string of git log/diff output and isn't scalable.We need to find a way to mock git behaviour for unit testing. I.e. start a git repo local to that test / test suite, easily add commits and tags.