Xqt submitted this change.

View Change


Approvals: Xqt: Verified; Looks good to me, approved
[tests] Temove pytest-timeout dependency

pytest-timeout is no longer used. Timeouts are defined in CI environments.

Change-Id: Iecd84b60217745e39f8ee57ee45e743fad916a6d
---
M dev-requirements.txt
M .github/workflows/doctest.yml
M .github/workflows/write_tests-ci.yml
M .github/workflows/oauth_tests-ci.yml
M .github/workflows/pywikibot-ci.yml
M .github/workflows/login_tests-ci.yml
6 files changed, 25 insertions(+), 15 deletions(-)

diff --git a/.github/workflows/doctest.yml b/.github/workflows/doctest.yml
index 55b31c9..4114edf 100644
--- a/.github/workflows/doctest.yml
+++ b/.github/workflows/doctest.yml
@@ -17,7 +17,7 @@
jobs:
build:
runs-on: ${{ matrix.os || 'ubuntu-latest'}}
- timeout-minutes: 15
+ timeout-minutes: 10

strategy:
fail-fast: false
@@ -64,7 +64,7 @@
python -Werror::UserWarning -m pwb generate_user_files -site:wikipedia:test -user:${{ env.PYWIKIBOT_USERNAME }} -v -debug;

- name: doctest with pytest
- timeout-minutes: 10
+ timeout-minutes: 5
run: |
python pwb.py version
pytest --version
diff --git a/.github/workflows/login_tests-ci.yml b/.github/workflows/login_tests-ci.yml
index b2f6e84..872347e 100644
--- a/.github/workflows/login_tests-ci.yml
+++ b/.github/workflows/login_tests-ci.yml
@@ -16,7 +16,7 @@
jobs:
build:
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
- timeout-minutes: 2
+ timeout-minutes: 30

strategy:
fail-fast: false
@@ -114,7 +114,7 @@
echo "('${{ env.PYWIKIBOT_USERNAME }}', '${{ secrets.PYWIKIBOT_USERPWD }}')" > passwordfile

- name: Test with unittest
- timeout-minutes: 1
+ timeout-minutes: 2
run: |
python pwb.py version
coverage run -m unittest -vv tests/site_login_logout_tests.py
diff --git a/.github/workflows/oauth_tests-ci.yml b/.github/workflows/oauth_tests-ci.yml
index 7a346843..c12e96e 100644
--- a/.github/workflows/oauth_tests-ci.yml
+++ b/.github/workflows/oauth_tests-ci.yml
@@ -17,11 +17,11 @@
jobs:
build:
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
- timeout-minutes: 2
+ timeout-minutes: 5

strategy:
fail-fast: false
- max-parallel: 15
+ max-parallel: 7

matrix:
python-version: ["pypy3.7", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12.0-alpha - 3.12.0"]
@@ -97,7 +97,7 @@
echo "console_encoding = 'utf8'" >> user-config.py

- name: Test with unittest
- timeout-minutes: 1
+ timeout-minutes: 2
env:
PYWIKIBOT_TEST_OAUTH: ${{ secrets[format('{0}', steps.token.outputs.uppercase)] }}
run: |
diff --git a/.github/workflows/pywikibot-ci.yml b/.github/workflows/pywikibot-ci.yml
index 215613d..5ead7d4 100644
--- a/.github/workflows/pywikibot-ci.yml
+++ b/.github/workflows/pywikibot-ci.yml
@@ -19,11 +19,11 @@
build:
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
continue-on-error: ${{ matrix.experimental || false }}
- timeout-minutes: 120
+ timeout-minutes: 90

strategy:
fail-fast: false
- max-parallel: 16
+ max-parallel: 17

matrix:
python-version: ["pypy3.7", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12.0-alpha - 3.12.0"]
@@ -122,7 +122,7 @@
- name: Test with unittest or pytest
id: ci_test
continue-on-error: true
- timeout-minutes: 90
+ timeout-minutes: 70
env:
PYWIKIBOT_TEST_NO_RC:
${{ (matrix.site == 'wikisource:zh' || matrix.test_no_rc) && 1 || 0 }}
diff --git a/.github/workflows/write_tests-ci.yml b/.github/workflows/write_tests-ci.yml
index 51db39b..b8d0540 100644
--- a/.github/workflows/write_tests-ci.yml
+++ b/.github/workflows/write_tests-ci.yml
@@ -17,11 +17,11 @@
build:
runs-on: 'ubuntu-latest'
continue-on-error: ${{ matrix.experimental || false }}
- timeout-minutes: 120
+ timeout-minutes: 60

strategy:
fail-fast: false
- max-parallel: 16
+ max-parallel: 1

matrix:
python-version: ["3.7"]
@@ -65,10 +65,10 @@
echo "password_file = os.path.expanduser('passwordfile')" >> user-config.py
echo "('${{ env.PYWIKIBOT_USERNAME }}', '${{ secrets.PYWIKIBOT_USERPWD }}')" > passwordfile

- - name: Test with unittest or pytest
+ - name: Test with pytest
id: ci_test
continue-on-error: true
- timeout-minutes: 90
+ timeout-minutes: 55
env:
PYWIKIBOT_TEST_WRITE: ${{ matrix.site == 'wikipedia:test' && 1 || 0}}
run: |
diff --git a/dev-requirements.txt b/dev-requirements.txt
index 8df802e..1da7ff2 100644
--- a/dev-requirements.txt
+++ b/dev-requirements.txt
@@ -4,7 +4,6 @@
pytest >= 7.0.1
pytest-cov >= 3.0.0; python_version>="3.10"
pytest-cov >= 2.11.1; python_version<"3.10"
-pytest-timeout
pytest-subtests >= 0.3.2
pytest-attrib>=0.1.3


To view, visit change 913906. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Iecd84b60217745e39f8ee57ee45e743fad916a6d
Gerrit-Change-Number: 913906
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-MessageType: merged