Skip to content

Commit d4abb93

Browse files
committed
Use verbose in py37 for coverage
Also add pragma: nocover in checks for < Python 3.5.2 because that's not available in GitHub actions.
1 parent e30036a commit d4abb93

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/main.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ jobs:
7979
python: "3.7"
8080
os: ubuntu-latest
8181
tox_env: "py37-lsof-numpy-oldattrs-pexpect-twisted"
82+
verbose: "-vv"
8283
- name: "ubuntu-py37-pluggy"
8384
python: "3.7"
8485
os: ubuntu-latest
@@ -127,15 +128,15 @@ jobs:
127128
128129
- name: Test without coverage
129130
if: "matrix.skip_coverage"
130-
run: "tox -e ${{ matrix.tox_env }}"
131+
run: "tox -e ${{ matrix.tox_env }} -- ${{ matrix.verbose }}"
131132

132133
- name: Test with coverage
133134
if: "! matrix.skip_coverage"
134135
env:
135136
_PYTEST_TOX_COVERAGE_RUN: "coverage run -m"
136137
COVERAGE_PROCESS_START: ".coveragerc"
137138
_PYTEST_TOX_EXTRA_DEP: "coverage-enable-subprocess"
138-
run: "tox -e ${{ matrix.tox_env }}"
139+
run: "tox -e ${{ matrix.tox_env }} -- ${{ matrix.verbose }}"
139140

140141
- name: Prepare coverage token
141142
if: success() && !matrix.skip_coverage && ( github.repository == 'pytest-dev/pytest' || github.event_name == 'pull_request' )

src/_pytest/compat.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ def getvalue(self) -> str:
371371
return self.buffer.getvalue().decode("UTF-8")
372372

373373

374-
if sys.version_info < (3, 5, 2):
374+
if sys.version_info < (3, 5, 2): # pragma: no cover
375375

376376
def overload(f): # noqa: F811
377377
return f

testing/python/raises.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def __call__(self):
166166
# Early versions of Python 3.5 have some bug causing the
167167
# __call__ frame to still refer to t even after everything
168168
# is done. This makes the test pass for them.
169-
if sys.version_info < (3, 5, 2):
169+
if sys.version_info < (3, 5, 2): # pragma: no cover
170170
del self
171171
raise ValueError
172172

0 commit comments

Comments
 (0)