This is cleaner than needing to set an environment variable before
running unit tests.
Implements #28 (Check if unittest is loaded to determine if we are testing)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I want to be able to test the new gtk4 code, but I can't do that with
the legacy code still enabled since gtk3 and gtk4 can't both be loaded
at the same time. The solution is to create a new "tests" target for
testing the new stuff.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I'll eventually need to be able to run everything as a single
application, so let's prepare for that now. This gives us a chance to
get the imports right from the start, rather than needing to go through
and fix things up again.
I also add a test to make sure everything works as expected.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I added a make target for code coverage, and used that to identify code
that isn't getting run.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
It's useful to have a way to override where data gets placed in the
filesystem so we don't accidentally clobber production data with test
data while running tests.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
We account for some fallback values, and also attempt to detect
discnumbers from the album name.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
We'll eventually pull out all the fields we need from a Mutagen
FileInfo class, but that has a dictionary-like interface so we can
easily fake one up for testing.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>