mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-12-08 20:39:08 +00:00
Apply most best practices of PEP 8
This refactoring includes:
- Two empty lines before each global function
- Using '{0} {1}'.format(str1, str2) instead of str1 + ' ' + str2
Sometimes this will make lines longer, sometimes shorter.
- Starting all comments with # + space + comment
- Make lines not longer than 80 characters in most cases
- Renaming some variables to make more sense
- Add some missing code like returns and Exceptions
Not included, but follows:
- Make some comments docstrings
- Rename all 'file' variables, only for Python 2
- Remove some way too verbose comments ;)
This commit is contained in:
@@ -4,18 +4,21 @@ import spotdl
|
||||
|
||||
username = 'alex'
|
||||
|
||||
|
||||
def test_user():
|
||||
expect_playlists = 7
|
||||
playlists = spotdl.spotify.user_playlists(username)
|
||||
playlists = len(playlists['items'])
|
||||
assert playlists == expect_playlists
|
||||
|
||||
|
||||
def test_playlist():
|
||||
expect_tracks = 14
|
||||
playlist = spotdl.spotify.user_playlists(username)['items'][0]
|
||||
tracks = playlist['tracks']['total']
|
||||
assert tracks == expect_tracks
|
||||
|
||||
|
||||
def test_tracks():
|
||||
playlist = spotdl.spotify.user_playlists(username)['items'][0]
|
||||
expect_lines = playlist['tracks']['total']
|
||||
|
||||
Reference in New Issue
Block a user