jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] tools_tests: Prevent overwriting name parameter ......................................................................
[FIX] tools_tests: Prevent overwriting name parameter
The `name` parameter for the `__new__` method was accidentally overwritten when it created the tests with baf31f1b.
Change-Id: I9473d7132ca031956edc27db7f23f69941ed3c89 --- M tests/tools_tests.py 1 file changed, 3 insertions(+), 3 deletions(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/tools_tests.py b/tests/tools_tests.py index c58e33f..2d0935e 100644 --- a/tests/tools_tests.py +++ b/tests/tools_tests.py @@ -506,9 +506,9 @@ self.assertNoDeprecation() return test_method
- for name, tested_method in list(dct.items()): - if name.startswith('_method_test_'): - suffix = name[len('_method_test_'):] + for attr, tested_method in list(dct.items()): + if attr.startswith('_method_test_'): + suffix = attr[len('_method_test_'):] cls.add_method(dct, 'test_method_' + suffix, create_test(tested_method), doc_suffix='on {0}'.format(suffix))
pywikibot-commits@lists.wikimedia.org