Skip to content

Commit 26ccb78

Browse files
committed
add README doctests to tox tests and github actions
1 parent 0c7d501 commit 26ccb78

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

.github/workflows/tabulate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
python -m pip install pytest pytest-cov numpy pandas "wcwidth>=0.6.0"
2727
- name: Run tests
2828
run: |
29-
pytest -v --doctest-modules --ignore benchmark --cov=tabulate --cov-branch --cov-report=xml
29+
pytest -v --doctest-modules --ignore benchmark --doctest-glob="README.md" --cov=tabulate --cov-branch --cov-report=xml
3030
- name: Upload coverage reports to Codecov
3131
uses: codecov/codecov-action@v5
3232
with:

tox.ini

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ python =
2020
3.14: py314-extra
2121

2222
[testenv]
23-
commands = pytest -v --doctest-modules --ignore benchmark {posargs}
23+
commands = pytest -v --doctest-modules --ignore benchmark --doctest-glob="README.md" {posargs}
2424
deps =
2525
pytest
2626
passenv =
@@ -37,13 +37,13 @@ deps =
3737

3838
[testenv:py38]
3939
basepython = python3.8
40-
commands = pytest -v --doctest-modules --ignore benchmark {posargs}
40+
commands = pytest -v --doctest-modules --ignore benchmark --doctest-glob="README.md" {posargs}
4141
deps =
4242
pytest
4343

4444
[testenv:py38-extra]
4545
basepython = python3.8
46-
commands = pytest -v --doctest-modules --ignore benchmark {posargs}
46+
commands = pytest -v --doctest-modules --ignore benchmark --doctest-glob="README.md" {posargs}
4747
deps =
4848
pytest
4949
numpy
@@ -53,13 +53,13 @@ deps =
5353

5454
[testenv:py39]
5555
basepython = python3.9
56-
commands = pytest -v --doctest-modules --ignore benchmark {posargs}
56+
commands = pytest -v --doctest-modules --ignore benchmark --doctest-glob="README.md" {posargs}
5757
deps =
5858
pytest
5959

6060
[testenv:py39-extra]
6161
basepython = python3.9
62-
commands = pytest -v --doctest-modules --ignore benchmark {posargs}
62+
commands = pytest -v --doctest-modules --ignore benchmark --doctest-glob="README.md" {posargs}
6363
deps =
6464
pytest
6565
numpy
@@ -69,14 +69,14 @@ deps =
6969

7070
[testenv:py310]
7171
basepython = python3.10
72-
commands = pytest -v --doctest-modules --ignore benchmark {posargs}
72+
commands = pytest -v --doctest-modules --ignore benchmark --doctest-glob="README.md" {posargs}
7373
deps =
7474
pytest
7575

7676
[testenv:py310-extra]
7777
basepython = python3.10
7878
setenv = PYTHONDEVMODE = 1
79-
commands = pytest -v --doctest-modules --ignore benchmark {posargs}
79+
commands = pytest -v --doctest-modules --ignore benchmark --doctest-glob="README.md" {posargs}
8080
deps =
8181
pytest
8282
numpy
@@ -86,14 +86,14 @@ deps =
8686

8787
[testenv:py311]
8888
basepython = python3.11
89-
commands = pytest -v --doctest-modules --ignore benchmark {posargs}
89+
commands = pytest -v --doctest-modules --ignore benchmark --doctest-glob="README.md" {posargs}
9090
deps =
9191
pytest
9292

9393
[testenv:py311-extra]
9494
basepython = python3.11
9595
setenv = PYTHONDEVMODE = 1
96-
commands = pytest -v --doctest-modules --ignore benchmark {posargs}
96+
commands = pytest -v --doctest-modules --ignore benchmark --doctest-glob="README.md" {posargs}
9797
deps =
9898
pytest
9999
numpy
@@ -102,14 +102,14 @@ deps =
102102

103103
[testenv:py312]
104104
basepython = python3.12
105-
commands = pytest -v --doctest-modules --ignore benchmark {posargs}
105+
commands = pytest -v --doctest-modules --ignore benchmark --doctest-glob="README.md" {posargs}
106106
deps =
107107
pytest
108108

109109
[testenv:py312-extra]
110110
basepython = python3.12
111111
setenv = PYTHONDEVMODE = 1
112-
commands = pytest -v --doctest-modules --ignore benchmark {posargs}
112+
commands = pytest -v --doctest-modules --ignore benchmark --doctest-glob="README.md" {posargs}
113113
deps =
114114
pytest
115115
numpy
@@ -118,14 +118,14 @@ deps =
118118

119119
[testenv:py313]
120120
basepython = python3.13
121-
commands = pytest -v --doctest-modules --ignore benchmark {posargs}
121+
commands = pytest -v --doctest-modules --ignore benchmark --doctest-glob="README.md" {posargs}
122122
deps =
123123
pytest
124124

125125
[testenv:py313-extra]
126126
basepython = python3.13
127127
setenv = PYTHONDEVMODE = 1
128-
commands = pytest -v --doctest-modules --ignore benchmark {posargs}
128+
commands = pytest -v --doctest-modules --ignore benchmark --doctest-glob="README.md" {posargs}
129129
deps =
130130
pytest
131131
numpy
@@ -134,14 +134,14 @@ deps =
134134

135135
[testenv:py314]
136136
basepython = python3.14
137-
commands = pytest -v --doctest-modules --ignore benchmark {posargs}
137+
commands = pytest -v --doctest-modules --ignore benchmark --doctest-glob="README.md" {posargs}
138138
deps =
139139
pytest
140140

141141
[testenv:py314-extra]
142142
basepython = python3.14
143143
setenv = PYTHONDEVMODE = 1
144-
commands = pytest -v --doctest-modules --ignore benchmark {posargs}
144+
commands = pytest -v --doctest-modules --ignore benchmark --doctest-glob="README.md" {posargs}
145145
deps =
146146
pytest
147147
numpy

0 commit comments

Comments
 (0)