-
Notifications
You must be signed in to change notification settings - Fork 0
Testing
If you have nose, just run
nosetests
in the beets repository. Otherwise, cd test
and then
./testall.py
.
- library options
- browsing functions (artists, albums, items) AND their naive implementations
- MusicBrainz -- need to mock the web service. This version has some tests that should be reinstated once the WS is mocked out.
- UI code -- this breaks all the time. Need a good way to mock the filesystem.
It would be nice to get rid of the rsrc
directory with all the sample files in
it and instead just include the relevant metadata somewhere. A nice mock
filesystem would also be convenient.
The test_mediafile_basic.py
file uses a bunch of trickery to generate about 500 different tests. Many of these are dependent, so it would make sense to collapse them into a smaller number of bigger tests. The trickery used here also doesn't seem to work with nose for unknown reasons, so going with a more straightforward style would be awesome.
It would be awesome to enable parallel test execution in nose.
There's a tool called cram that looks useful for acceptance testing of CLI interactions.
coverage run --source=beets testall.py
(We're at about 60% coverage right now
-- not too good! There are some pretty obvious things to cover, too.)
python -3 testall.py
(Raises a few warnings, and a lot of warnings for
Mutagen. Right now, the warnings are: buffer has been replaced with memoryview
in py3k, and we use some integer division. Python 2.6 supports b''
literals,
but Python 2.5 doesn't.
Use unicode-nazi.