jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/463614 )

Change subject: [cleanup] cleanup tests/__init__.py
......................................................................

[cleanup] cleanup tests/__init__.py

- use str.format(...) instead of modulo for type specifier arguments

Change-Id: If23cd3cd2007905601d9d6904dd479fd05d02f61
---
M tests/__init__.py
1 file changed, 10 insertions(+), 8 deletions(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/__init__.py b/tests/__init__.py
index 49c3b00..caacc39 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -61,7 +61,8 @@
 join_root_path.path = 'root'
 join_tests_path = create_path_func(join_root_path, 'tests')
 join_cache_path = create_path_func(join_tests_path,
-                                   'apicache-py%d' % PYTHON_VERSION[0])
+                                   'apicache-py{}'
+                                   .format(PYTHON_VERSION[0]))
 join_data_path = create_path_func(join_tests_path, 'data')
 join_pages_path = create_path_func(join_tests_path, 'pages')

@@ -203,18 +204,18 @@
     # discover() ordering of unit tests.
     if disabled_test_modules:
         unittest_print(
-            'Disabled test modules (to run: python -m unittest ...):\n  %s'
-            % ', '.join(disabled_test_modules))
+            'Disabled test modules (to run: python -m unittest ...):\n  {}'
+            .format(', '.join(disabled_test_modules)))

     if extra_test_modules:
         unittest_print(
-            'Extra test modules (run after library, before scripts):\n  %s'
-            % ', '.join(extra_test_modules))
+            'Extra test modules (run after library, before scripts):\n  {}'
+            .format(', '.join(extra_test_modules)))

     if disabled_tests:
         unittest_print(
-            'Skipping tests (to run: python -m unittest ...):\n  %r'
-            % disabled_tests)
+            'Skipping tests (to run: python -m unittest ...):\n  {!r}'
+            .format(disabled_tests))

     modules = [module
                for module in test_modules
@@ -264,7 +265,8 @@
 if config.max_retries > 2:
     if 'PYWIKIBOT_TEST_QUIET' not in os.environ:
         unittest_print(
-            'tests: max_retries reduced from %d to 1' % config.max_retries)
+            'tests: max_retries reduced from {} to 1'
+            .format(config.max_retries))
     config.max_retries = 1

 # Raise CaptchaError if a test requires solving a captcha

--
To view, visit https://gerrit.wikimedia.org/r/463614
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If23cd3cd2007905601d9d6904dd479fd05d02f61
Gerrit-Change-Number: 463614
Gerrit-PatchSet: 4
Gerrit-Owner: D3r1ck01 <[email protected]>
Gerrit-Reviewer: D3r1ck01 <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot (75)
Gerrit-CC: Dvorapa <[email protected]>
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to