Skip to content

Commit 2a746b6

Browse files
committed
Adapt requirements and tests
1 parent 49125b8 commit 2a746b6

File tree

6 files changed

+26
-21
lines changed

6 files changed

+26
-21
lines changed

.github/workflows/release-docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ on:
88
jobs:
99
build:
1010

11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-24.04
1212

1313
steps:
1414
- uses: actions/checkout@v5
15-
- name: Set up Python 3.12
15+
- name: Set up Python 3.11
1616
uses: actions/setup-python@v6
1717
with:
18-
python-version: "3.12"
18+
python-version: "3.11"
1919
- name: Install dependencies
2020
run: |
2121
python -m pip install --upgrade pip

.github/workflows/test-package.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ on: [push]
55
jobs:
66
build:
77

8-
runs-on: ubuntu-latest
8+
runs-on: ubuntu-24.04
99
timeout-minutes: 5
1010
strategy:
1111
max-parallel: 6
1212
matrix:
13-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.9', 'pypy-3.10', 'pypy-3.11']
13+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.9', 'pypy-3.10', 'pypy-3.11']
1414

1515
steps:
1616
- uses: actions/checkout@v5
@@ -23,11 +23,11 @@ jobs:
2323
python -m pip install --upgrade pip
2424
pip install .[tests] --use-pep517
2525
- name: Lint with flake8
26-
if: matrix.python-version == '3.12'
26+
if: matrix.python-version == '3.11'
2727
run: |
2828
flake8 webware setup.py --count --exit-zero --statistics
2929
- name: Lint with pylint
30-
if: matrix.python-version == '3.12'
30+
if: matrix.python-version == '3.11'
3131
run: |
3232
pylint webware
3333
- name: Run all unit tests

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@
1111
long_description = fh.read()
1212

1313
requireDocs = [
14-
'Sphinx>=5,<7', 'sphinx_rtd_theme>=1.1'
14+
'Sphinx>=5,<9', 'sphinx_rtd_theme>=1.1,<4'
1515
]
1616
requireDev = [
1717
'Pygments>=2.14,<3', 'WebTest>=3,<4',
18-
'waitress>=2,<3', 'hupper>=1.10,<2',
18+
'waitress>=2,<4', 'hupper>=1.10,<2',
1919
]
2020
requireExamples = [
2121
'DBUtils>=3,<4', 'dominate>=2.7,<3', 'yattag>=1.15,<2',
22-
'Pygments>=2.14,<3', 'Pillow>=8,<10'
22+
'Pygments>=2.14,<3', 'Pillow>=8,<11'
2323
]
2424
requireTests = [
25-
'psutil>=5.9,<6', 'flake8>=5,<7', 'pylint>=2.13,<3', 'tox>=3.28,<5',
25+
'psutil>=5.9,<8', 'flake8>=7,<9', 'pylint>=2.16,<3', 'tox>=3.28,<5',
2626
'pywin32>=300,<400;'
2727
'sys_platform=="win32" and implementation_name=="cpython"'
2828
] + requireDev + requireExamples

tox.ini

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
[tox]
2-
envlist = py{36,37,38,39,310,311,312}, pypy3, flake8, pylint, docs, manifest
2+
envlist = py3{6,7,8,9,10,11,12}, pypy3{9,10,11}, flake8, pylint, docs, manifest
33

44
[testenv:flake8]
5-
basepython = python3.12
6-
deps = flake8>=6,<7
5+
basepython = python3.11
6+
deps = flake8>=7,<9
77
commands =
88
flake8 webware setup.py
99

1010
[testenv:pylint]
11-
basepython = python3.12
11+
basepython = python3.11
1212
deps = pylint>=2.16,<3
1313
commands =
1414
pylint webware
1515

1616
[testenv:docs]
17-
basepython = python3.12
17+
basepython = python3.11
1818
extras =
1919
docs
2020
commands =
2121
sphinx-build -b html -nEW docs docs/_build/html
2222

2323
[testenv:manifest]
24-
basepython = python3.12
24+
basepython = python3.11
2525
deps = check-manifest>=0.49
2626
commands =
2727
check-manifest -v

webware/Tests/TestEndToEnd/TestExamples.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ def testImageDemo(self):
419419
r = self.testApp.get('/ImageDemo?fmt=.png')
420420
self.assertEqual(r.status, '200 OK')
421421
self.assertEqual(r.content_type, 'image/png')
422-
self.assertTrue(2000 < r.content_length < 2500)
422+
self.assertTrue(2000 < r.content_length < 4500)
423423
self.assertTrue(r.body.startswith(b'\x89PNG\r\n\x1a\n'))
424424

425425
def testDominateDemo(self):

webware/Tests/TestEndToEnd/TestServer.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,16 @@ def testExitCode(self):
203203

204204
def testExpectedServerOutput(self):
205205
expectedOutput = expectedServerOutput.strip().splitlines()
206-
self.compareOutput(self.output, expectedOutput)
206+
output = self.output
207+
self.compareOutput(output, expectedOutput)
207208
startLine = f'Webware for Python {self.version} Application'
208-
self.assertEqual(self.output[0], startLine)
209+
if 'UserWarning' in output[0]:
210+
del output[0]
211+
while output[0].startswith(' '):
212+
del output[0]
213+
self.assertEqual(output[0], startLine)
209214
self.assertTrue(not any(
210-
'ERROR' in line or 'WARNING' in line for line in self.output))
215+
'ERROR' in line or 'WARNING' in line for line in output))
211216

212217
def testStartPage(self):
213218
self.assertTrue(self.running)

0 commit comments

Comments
 (0)