Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)

src/p/y/Pythagora-HEAD/tests/test_mpdlibrary.py   Pythagora(Download)
            for song in test_list if song.get('artist') == _name)
    assert sorted(artist.albums) == expect
    expect = sorted(mpdlibrary.Genre(song.get('genre'), library)
            for song in test_list if song.get('artist') == _name)
    assert sorted(artist.genres) == expect
            for song in test_list if song.get('album') == _name)
    assert sorted(album.artists) == expect
    expect = sorted(mpdlibrary.Genre(song.get('genre'), library)
            for song in test_list if song.get('album') == _name)
    assert sorted(album.genres) == expect
def test_genre_single():
    genre = mpdlibrary.Genre('Rock', library)
    assert genre == 'Rock'
    expect = sorted(mpdlibrary.Song(song, library) for song in test_list if song.get('genre') == 'Rock')
    assert sorted(genre.songs) == expect
def test_genre_multiple():
    genre = mpdlibrary.Genre(['Electronic', 'Electronic'], library)
    assert genre == 'Electronic'
    expect = sorted(mpdlibrary.Song(song, library) for song in test_list if 'Electronic' in song.get('genre', []))
    assert sorted(genre.songs) == expect