Skip to content

Commit c5a80e5

Browse files
Merge pull request Pylons#470 from miketheman/miketheman/contributing
docs,tests: update contributing running tests section
2 parents 407532d + ae5b26f commit c5a80e5

File tree

3 files changed

+33
-8
lines changed

3 files changed

+33
-8
lines changed

.coveragerc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ source =
1111
[report]
1212
show_missing = true
1313
precision = 2
14+
15+
[html]
16+
show_contexts = True

contributing.md

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,42 @@ one or two development branches are actively maintained.
3636
Running Tests
3737
-------------
3838

39-
*Note:* This section needs better instructions.
40-
4139
Run `tox` from within your checkout. This will run the tests across all
4240
supported systems and attempt to build the docs.
4341

44-
To run the tests for Python 2.x only:
42+
For example, to run the test suite with your current Python runtime:
43+
44+
```shell
45+
tox -e py
46+
```
47+
48+
If you wish to run multiple targets, you can do so by separating them with a
49+
comma:
50+
51+
```shell
52+
tox -e py312,coverage
53+
```
54+
55+
If you've already run the coverage target and want to see the results in HTML,
56+
you can override `tox.ini` settings with the `commands` option:
57+
58+
```shell
59+
tox -e coverage -x testenv:coverage.commands="coverage html"
60+
```
61+
62+
To build the docs:
4563

46-
$ tox py2-cover
64+
```shell
65+
tox -e docs
66+
```
4767

48-
To build the docs for Python 3.x only:
68+
List all possible targets:
4969

50-
$ tox py3-docs
70+
```shell
71+
tox list # or `tox l`
72+
```
5173

52-
See the `tox.ini` file for details.
74+
See `tox.ini` file for details, or <https://tox.wiki/> for general `tox` usage.
5375

5476

5577
Building documentation for a Pylons Project project

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ license_file = docs/license.txt
88
python_files = test_*.py
99
testpaths =
1010
tests
11-
addopts = -W always --cov --cov-report=term-missing
11+
addopts = -W always --cov --cov-context=test --cov-report=term-missing

0 commit comments

Comments
 (0)