Skip to content

Commit dc5debe

Browse files
committed
Fix test run in workflow file
1 parent c43692c commit dc5debe

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

.github/workflows/test-package.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,14 @@ jobs:
2020
- name: Install dependencies
2121
run: |
2222
python -m pip install --upgrade pip
23-
pip install .
23+
pip install .[test]
2424
- name: Lint with flake8
2525
run: |
26-
pip install flake8
27-
# stop the build if there are Python syntax errors or undefined names
28-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
29-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
30-
flake8 webware setup.py --count --exit-zero --max-complexity=10 --max-line-length=79 --statistics
26+
flake8 webware setup.py --count --exit-zero --statistics
3127
- name: Lint with pylint
3228
run: |
33-
pip install pylint
3429
pylint webware
3530
- name: Run all unit tests
3631
run: |
37-
python -m unittest discover -fv
32+
cd webware
33+
python -m unittest discover -fv -p Test*.py

docs/testing.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,23 @@ Next, change into the directory containing the main Webware package::
2121

2222
To test everything, run::
2323

24-
python -m unittest discover
24+
python -m unittest discover -p Test*.py
2525

2626
To test everything, and stop on the first failing test::
2727

28-
python -m unittest discover -f
28+
python -m unittest discover -p Test*.py -f
2929

3030
To test everything, and print verbose output::
3131

32-
python -m unittest discover -v
32+
python -m unittest discover -p Test*.py -v
3333

3434
To test only UserKit::
3535

36-
python -m unittest discover -vs UserKit
36+
python -m unittest discover -p Test*.py -vs UserKit
3737

3838
To test only the example servlets in the default context::
3939

40-
python -m unittest discover -vs Tests.TestEndToEnd.TestExamples
40+
python -m unittest discover -p Test*.py -vs Tests.TestEndToEnd.TestExamples
4141

4242
You can also use tox_ as a test runner. The Webware source package already contains a suitable tox.ini configuration file for running the unit tests with all supported Python versions, and also running a few additional code quality checks.
4343

0 commit comments

Comments
 (0)