Xqt has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1175571?usp=email )
Change subject: Revert "Improve execute_pwb to activate coverage only for non-override runs" ...................................................................... Revert "Improve execute_pwb to activate coverage only for non-override runs" This reverts commit daad84a34fa365fcd208697d4fe8fa812939a828. Reason for revert: no improvements found Change-Id: I99f08f5619f2fdc743908cf87192734d9e65eb47 --- M .github/workflows/doctest.yml M .github/workflows/login_tests-ci.yml M .github/workflows/oauth_tests-ci.yml M .github/workflows/pywikibot-ci.yml M .github/workflows/sysop_write_tests-ci.yml M .github/workflows/windows_tests.yml M tests/utils.py 7 files changed, 12 insertions(+), 12 deletions(-) Approvals: Xqt: Verified; Looks good to me, approved diff --git a/.github/workflows/doctest.yml b/.github/workflows/doctest.yml index eb55cb6..6c9b8b5 100644 --- a/.github/workflows/doctest.yml +++ b/.github/workflows/doctest.yml @@ -68,7 +68,7 @@ coverage run -m pytest pywikibot --doctest-modules --ignore-glob="*gui.py" --ignore-glob="*memento.py" - name: Show coverage statistics run: | - coverage combine || true + coverage combine coverage report - name: Upload coverage to Codecov uses: codecov/codecov-action@v5 diff --git a/.github/workflows/login_tests-ci.yml b/.github/workflows/login_tests-ci.yml index 835ad56..fe66042 100644 --- a/.github/workflows/login_tests-ci.yml +++ b/.github/workflows/login_tests-ci.yml @@ -124,7 +124,7 @@ coverage run -m unittest -vv tests/site_login_logout_tests.py - name: Show coverage statistics run: | - coverage combine || true + coverage combine coverage report - name: Upload coverage to Codecov uses: codecov/codecov-action@v5 diff --git a/.github/workflows/oauth_tests-ci.yml b/.github/workflows/oauth_tests-ci.yml index 0d8228c..008124b 100644 --- a/.github/workflows/oauth_tests-ci.yml +++ b/.github/workflows/oauth_tests-ci.yml @@ -102,7 +102,7 @@ coverage run -m unittest -vv - name: Show coverage statistics run: | - coverage combine || true + coverage combine coverage report - name: Upload coverage to Codecov uses: codecov/codecov-action@v5 diff --git a/.github/workflows/pywikibot-ci.yml b/.github/workflows/pywikibot-ci.yml index 46f51d8..dea4499 100644 --- a/.github/workflows/pywikibot-ci.yml +++ b/.github/workflows/pywikibot-ci.yml @@ -140,7 +140,7 @@ fi - name: Show coverage statistics run: | - coverage combine || true + coverage combine coverage report - name: Upload coverage to Codecov uses: codecov/codecov-action@v5 diff --git a/.github/workflows/sysop_write_tests-ci.yml b/.github/workflows/sysop_write_tests-ci.yml index b7a1b7d..917ba22 100644 --- a/.github/workflows/sysop_write_tests-ci.yml +++ b/.github/workflows/sysop_write_tests-ci.yml @@ -62,7 +62,7 @@ coverage run -m pytest -s -r A -a "${{ matrix.attr }}" - name: Show coverage statistics run: | - coverage combine || true + coverage combine coverage report - name: Upload coverage to Codecov uses: codecov/codecov-action@v5 diff --git a/.github/workflows/windows_tests.yml b/.github/workflows/windows_tests.yml index 95c8aed..579d45a 100644 --- a/.github/workflows/windows_tests.yml +++ b/.github/workflows/windows_tests.yml @@ -75,7 +75,7 @@ coverage run -m unittest discover -vv -p \"*_tests.py\"; - name: Show coverage statistics run: | - coverage combine || true + coverage combine coverage report - name: Upload coverage to Codecov uses: codecov/codecov-action@v5 diff --git a/tests/utils.py b/tests/utils.py index 454f41a..1c69793 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -528,14 +528,14 @@ command.append( f'import pwb; import pywikibot; {overrides}; pwb.main()') else: - # Test is running; activate coverage if present - if os.environ.get('PYWIKIBOT_TEST_RUNNING', '0') == '1': - with suppress(ModuleNotFoundError): - import coverage # noqa: F401 - command.extend(['-m', 'coverage', 'run']) - command.append(_pwb_py) + # Test is running; activate coverage if present + if os.environ.get('PYWIKIBOT_TEST_RUNNING', '0') == '1': + with suppress(ModuleNotFoundError): + import coverage # noqa: F401 + command = [command[0], '-m', 'coverage', 'run'] + command[1:] + return execute(command=command + args, data_in=data_in, timeout=timeout) -- To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1175571?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Change-Id: I99f08f5619f2fdc743908cf87192734d9e65eb47 Gerrit-Change-Number: 1175571 Gerrit-PatchSet: 2 Gerrit-Owner: Xqt <i...@gno.de> Gerrit-Reviewer: Xqt <i...@gno.de> Gerrit-Reviewer: jenkins-bot
_______________________________________________ Pywikibot-commits mailing list -- pywikibot-commits@lists.wikimedia.org To unsubscribe send an email to pywikibot-commits-le...@lists.wikimedia.org