Skip to content

Commit

Permalink
travis: fix backends
Browse files Browse the repository at this point in the history
Add cdrdao (we might want to stuff with it later on).
Mock libdiscid > 0.2.2 (with isrc support).
  • Loading branch information
JonnyJD committed Oct 14, 2013
1 parent 8abce5b commit bb4c53e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -7,7 +7,7 @@ python:
- "pypy"
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq libdiscid0
- sudo apt-get install -qq libdiscid0 cdrdao
install: pip install -q --use-mirrors discid musicbrainzngs
script: python setup.py test
branches:
Expand Down
1 change: 1 addition & 0 deletions isrcsubmit.py
Expand Up @@ -313,6 +313,7 @@ def has_program(program, strict=False):
def find_backend():
"""search for an available backend
"""
backend = None
for prog in BACKENDS:
if has_program(prog):
backend = prog
Expand Down
12 changes: 12 additions & 0 deletions test_isrcsubmit.py
Expand Up @@ -155,6 +155,18 @@ def _read(device=None, features=[]):

discid.read = _read

_isrcsubmit_has_program = isrcsubmit.has_program

def _has_program(program, strict=False):
if program == "libdiscid":
# we mock it anyways
# libdiscid >= 0.2.2 still needed to load discid
return True
else:
return _isrcsubmit_has_program(program, strict)

isrcsubmit.has_program = _has_program


# mock answers given by user
# - - - - - - - - - - - - -
Expand Down

0 comments on commit bb4c53e

Please sign in to comment.