Xqt has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1050704?usp=email )
Change subject: [tests] Remove PYWIKIBOT_TEST_PROD_ONLY test directive ......................................................................
[tests] Remove PYWIKIBOT_TEST_PROD_ONLY test directive
Prod only tests were introduced as temporary workaround for a bug on Travis with test sites. Tests on Travis was dropped, therefor this teporary fix can be removed after 9 years.
Bug: T96943 Change-Id: I25026b59b6bfc0049b16ea3ff8034189d3a00264 --- M .github/workflows/pywikibot-ci.yml M .github/workflows/windows_tests.yml M tests/aspects.py 3 files changed, 0 insertions(+), 10 deletions(-)
Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved
diff --git a/.github/workflows/pywikibot-ci.yml b/.github/workflows/pywikibot-ci.yml index 511f07b..c85c233 100644 --- a/.github/workflows/pywikibot-ci.yml +++ b/.github/workflows/pywikibot-ci.yml @@ -28,7 +28,6 @@ matrix: python-version: [ "pypy3.7", "pypy3.10", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13.0-alpha - 3.13.0", "3.14-dev" ] site: [ "wikipedia:en", "wikisource:zh" ] - test_prod_only: [ true ] include: - python-version: "3.7" site: wikipedia:test @@ -122,7 +121,6 @@ env: PYWIKIBOT_TEST_NO_RC: ${{ (matrix.site == 'wikisource:zh' || matrix.test_no_rc) && 1 || 0 }} - PYWIKIBOT_TEST_PROD_ONLY: ${{ matrix.test_prod_only && 1 || 0 }} run: | python pwb.py version if [ ${{matrix.site || 0}} != 'wikipedia:test' ]; then diff --git a/.github/workflows/windows_tests.yml b/.github/workflows/windows_tests.yml index afa0b9a..f8a4da4 100644 --- a/.github/workflows/windows_tests.yml +++ b/.github/workflows/windows_tests.yml @@ -29,7 +29,6 @@ python-version: [ "3.7.0", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13.0-alpha - 3.13.0" ] python-arch: [ x64, x86 ] site: [ "wikipedia:en" ] - test_prod_only: [ false ] experimental: [ true ]
steps: @@ -103,7 +102,6 @@ env: PYWIKIBOT_TEST_NO_RC: ${{ (matrix.site == 'wikisource:zh' || matrix.test_no_rc) && 1 || 0 }} - PYWIKIBOT_TEST_PROD_ONLY: ${{ matrix.test_prod_only && 1 || 0 }} run: | python pwb.py version if [ ${{matrix.site || 0}} != 'wikipedia:test' ]; then diff --git a/tests/aspects.py b/tests/aspects.py index 3b22a58..a64d9b9 100644 --- a/tests/aspects.py +++ b/tests/aspects.py @@ -893,13 +893,7 @@ if dry: interface = DrySite
- prod_only = os.environ.get('PYWIKIBOT_TEST_PROD_ONLY', '0') == '1' for data in cls.sites.values(): - if (data.get('code') in ('test', 'mediawiki') - and prod_only and not dry): - raise unittest.SkipTest(f"Site code {data['code']!r} and" - ' PYWIKIBOT_TEST_PROD_ONLY is set.') - if 'site' not in data and 'code' in data and 'family' in data: with suppress_warnings(WARN_SITE_CODE, category=UserWarning): data['site'] = Site(data['code'], data['family'],