Skip to content

Commit

Permalink
no verbose tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cvzi committed Oct 24, 2018
1 parent 4acabaf commit dfa7574
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
16 changes: 8 additions & 8 deletions tests/test_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@
]


def test_examples(verbose):
def test_examples(verbose=False):
for test in copy.deepcopy(testdata):
parser = itunessmart.Parser(test["info"], test["criteria"])
result = parser.result
Expand Down Expand Up @@ -532,7 +532,7 @@ def readLibrary(filename):
return library


def test_library_minimal(verbose):
def test_library_minimal(verbose=False):
library = readLibrary("library_minimal.xml")

playlist = library['Playlists'][1]
Expand All @@ -549,7 +549,7 @@ def test_library_minimal(verbose):
assert mapping['38822E892B8D332A'] == "Chip - League of My Own II"


def test_bytes_parser(verbose):
def test_bytes_parser(verbose=False):
library = readLibrary("library_minimal.xml")

playlist = library['Playlists'][1]
Expand All @@ -564,7 +564,7 @@ def test_bytes_parser(verbose):



def test_library_onlysmartplaylists(verbose):
def test_library_onlysmartplaylists(verbose=False):
library = readLibrary("library_onlysmartplaylists.xml")

playlist = library['Playlists'][15]
Expand All @@ -588,7 +588,7 @@ def test_library_onlysmartplaylists(verbose):
assert parser.result.query == "(lower(Artist) LIKE '%adele%') OR (lower(Artist) LIKE '%austin howard brown%') OR (lower(Artist) LIKE '%churchill%') OR (lower(Artist) LIKE '%duenday%') OR (lower(Artist) LIKE '%gnarls barkley%') OR ( (lower(Artist) LIKE '%jack white%') AND (lower(Name) LIKE '%blue light%') ) OR (lower(Artist) LIKE '%more than lights%') OR (lower(Artist) LIKE '%santogold%') OR (lower(Artist) LIKE '%sutcliffe%') OR (lower(Artist) LIKE '%zz ward%')"


def test_xsp_minimal(verbose):
def test_xsp_minimal(verbose=False):
library = readLibrary("library_minimal.xml")

playlist = library['Playlists'][1]
Expand Down Expand Up @@ -623,7 +623,7 @@ def test_xsp_minimal(verbose):
os.remove(file)


def test_xsp_errors(verbose):
def test_xsp_errors(verbose=False):
parser = itunessmart.Parser(testdata[13]["info"], testdata[13]["criteria"])

assert parser.result.query == "(MediaKind != 'Home Video')"
Expand All @@ -634,7 +634,7 @@ def test_xsp_errors(verbose):
assert type(e) == itunessmart.xsp.PlaylistException


def test_xsp_subplaylists(verbose):
def test_xsp_subplaylists(verbose=False):
library = readLibrary("library_onlysmartplaylists.xml")
persistentIDMapping = itunessmart.generatePersistentIDMapping(library)
parser = itunessmart.Parser()
Expand Down Expand Up @@ -679,7 +679,7 @@ def test_xsp_subplaylists(verbose):
if os.path.isfile(file):
os.remove(file)

def run_all(verbose):
def run_all(verbose=False):
for fname, f in list(globals().items()):
if fname.startswith('test_'):
print("%s()" % fname)
Expand Down
8 changes: 3 additions & 5 deletions tests/test_small.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
import itunessmart
print("Imported itunessmart from %s" % os.path.abspath(os.path.join(include, "itunessmart")))



testdata = [
{
"desc" : "5 stars AND Media Kind is Music, Limited to 50000",
Expand Down Expand Up @@ -250,7 +248,7 @@ def test_examples(verbose=False):
else:
raise NotImplementedError(test["desc"])

def test_double_parse(verbose):
def test_double_parse(verbose=False):
parser = itunessmart.Parser(testdata[0]["info"], testdata[0]["criteria"])
query = parser.result.query
parser._parser.parse()
Expand All @@ -259,7 +257,7 @@ def test_double_parse(verbose):
assert query == parser.result.query


def test_reuse_parser(verbose):
def test_reuse_parser(verbose=False):
parser0 = itunessmart.Parser(testdata[0]["info"], testdata[0]["criteria"])
parser1 = itunessmart.Parser(testdata[1]["info"], testdata[1]["criteria"])

Expand All @@ -277,7 +275,7 @@ def test_reuse_parser(verbose):
assert parser0.result.queryTree == parser1.result.queryTree


def run_all(verbose):
def run_all(verbose=False):
for fname, f in list(globals().items()):
if fname.startswith('test_'):
print("%s()" % fname)
Expand Down

0 comments on commit dfa7574

Please sign in to comment.