def test_prepend_basepath():
    """Loading a relative path playlist entry prepends the basepath
    """
    sample = StringIO("actual/entry")
    actual = Playlist.parse_playlist(sample, '/basepath/')
    expected = ['/basepath/actual/entry']
    eq_(actual, expected)
def test_absolute_path():
    """"Loading an absolute path playlist entry doesn't use the basepath
    """
    sample = StringIO("/actual/entry")
    actual = Playlist.parse_playlist(sample, '/basepath/')
    expected = ['/actual/entry']
    eq_(actual, expected)
def test_ignore_comments():
    """Loading a playlist ignores comment lines
    """
    sample = StringIO("\n".join([
        "#ignore this",
        "/actual/entry"]))
    actual = Playlist.parse_playlist(sample, '')
    expected = ['/actual/entry']
    eq_(actual, expected)