jenkins-bot has submitted this change and it was merged.
Change subject: [PEP8] Reduce lines beneath 100 characters ......................................................................
[PEP8] Reduce lines beneath 100 characters
Change-Id: Ibe63d770b9e9b8d0ff46f11a1a54e84a88ce194d --- M tests/api_tests.py M tests/site_detect_tests.py 2 files changed, 9 insertions(+), 5 deletions(-)
Approvals: XZise: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/api_tests.py b/tests/api_tests.py index 2a76405..822f70a 100644 --- a/tests/api_tests.py +++ b/tests/api_tests.py @@ -58,9 +58,13 @@ # Extract parameter data from the body, it's ugly but allows us # to verify that we actually test the right request parameters = [p.split(b'=', 1) for p in parameters.split(b'&')] - parameters = dict( - (param.decode('ascii'), set(unquote_to_bytes(value).decode(kwargs['site'].encoding()).replace('+', ' ').split('|'))) - for param, value in parameters) + keys = [p[0].decode('ascii') for p in parameters] + values = [unquote_to_bytes(p[1]) for p in parameters] + values = [v.decode(kwargs['site'].encoding()) for v in values] + values = [v.replace('+', ' ') for v in values] + values = [set(v.split('|')) for v in values] + parameters = dict(zip(keys, values)) + if 'fake' not in parameters: return False # do an actual request if self.assert_parameters: diff --git a/tests/site_detect_tests.py b/tests/site_detect_tests.py index bb3334d..f88c128 100644 --- a/tests/site_detect_tests.py +++ b/tests/site_detect_tests.py @@ -54,8 +54,8 @@ super(TestWikiSiteDetection, self).tearDown() print('Out of %d sites, %d tests passed, %d tests failed ' 'and %d tests raised an error' - % (len(self.all), len(self.passes), len(self.failures), len(self.errors) - ) + % (len(self.all), len(self.passes), len(self.failures), + len(self.errors)) )
PREFIXES = ['PASS', 'ERR ', 'FAIL', 'MISS']
pywikibot-commits@lists.wikimedia.org