tests: Fix outstanding flake8 errors in tests

This commit is contained in:
Thomas Adamcik 2014-12-30 00:14:49 +01:00
parent 627b856578
commit ab49d75a45
3 changed files with 7 additions and 7 deletions

View File

@ -25,8 +25,8 @@ def encode(value):
class ExpandedPath(bytes):
def __new__(self, original, expanded):
return super(ExpandedPath, self).__new__(self, expanded)
def __new__(cls, original, expanded):
return super(ExpandedPath, cls).__new__(cls, expanded)
def __init__(self, original, expanded):
self.original = original

View File

@ -36,7 +36,7 @@ def load_protocol_modules():
music_db, playback, reflection, status, stickers, stored_playlists)
def INT(value):
def INT(value): # noqa: N802
"""Converts a value that matches [+-]?\d+ into and integer."""
if value is None:
raise ValueError('None is not a valid integer')
@ -44,7 +44,7 @@ def INT(value):
return int(value)
def UINT(value):
def UINT(value): # noqa: N802
"""Converts a value that matches \d+ into an integer."""
if value is None:
raise ValueError('None is not a valid integer')
@ -53,14 +53,14 @@ def UINT(value):
return int(value)
def BOOL(value):
def BOOL(value): # noqa: N802
"""Convert the values 0 and 1 into booleans."""
if value in ('1', '0'):
return bool(int(value))
raise ValueError('%r is not 0 or 1' % value)
def RANGE(value):
def RANGE(value): # noqa: N802
"""Convert a single integer or range spec into a slice
``n`` should become ``slice(n, n+1)``

View File

@ -97,7 +97,7 @@ class LogLevelConfigSchemaTest(unittest.TestCase):
class DidYouMeanTest(unittest.TestCase):
def testSuggestoins(self):
def test_suggestions(self):
choices = ('enabled', 'username', 'password', 'bitrate', 'timeout')
suggestion = schemas._did_you_mean('bitrate', choices)