Ejemplo n.º 1
0
def test_load_songdata_limit_artists(songfile):
    """It should only return the requested artists."""
    songs = util.load_songdata(songdata_file=songfile, artists=["dog"])
    assert len(songs) == 1
    assert songs[0] == "woof\n\nchorus\nwoof\n"
Ejemplo n.º 2
0
def test_load_songdata(songfile):
    """It should return an array of songs."""
    songs = util.load_songdata(songdata_file=songfile, artists=['cat', 'dog'])
    assert len(songs) == 2
    assert songs[0] == '\nmeow\nmeow'
    assert songs[1] == 'woof\n\nchorus\nwoof\n'
Ejemplo n.º 3
0
def test_load_songdata(songfile):
    """It should return an array of songs."""
    songs = util.load_songdata(songdata_file=songfile, artists=["cat", "dog"])
    assert len(songs) == 2
    assert songs[0] == "\nmeow\nmeow"
    assert songs[1] == "woof\n\nchorus\nwoof\n"
Ejemplo n.º 4
0
def test_load_songdata_all_artists(songfile):
    """It should only return the requested artists."""
    songs = util.load_songdata(songdata_file=songfile, artists=[])
    assert len(songs) == 2