Skip to content

Commit b852953

Browse files
committed
Feedback; include temp files in .coverage
1 parent 4384206 commit b852953

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,8 @@ jobs:
7777
# accidentally pick up typing_extensions as installed by a dependency
7878
cd src
7979
python --version # just to make sure we're running the right one
80-
export COVERAGE_FILE=.coverage_${{ matrix.python-version }}
81-
# Run with coverage omit files that are executed in tempfiles
82-
coverage run --omit ann_module*,inspect* -m unittest test_typing_extensions.py
83-
80+
# Run tests under coverage
81+
python -m coverage run -m unittest test_typing_extensions.py
8482
- name: Test typing_extensions no coverage on pypy
8583
if: ${{ startsWith(matrix.python-version, 'pypy') }}
8684
run: |
@@ -147,7 +145,6 @@ jobs:
147145
contents: read
148146
pull-requests: write
149147

150-
151148
if: ${{ always() }}
152149

153150
steps:
@@ -170,7 +167,8 @@ jobs:
170167
# List the files to see what we have
171168
echo "Combining coverage files:"
172169
coverage combine --data-file=.coverage .coverage*
173-
# add -i to ignore parsed code of temp files.
170+
# add -i to ignore code in ephemeral python files created in temporary
171+
# directories during tests; this will result in warnings in the report
174172
coverage report -i -m
175173
coverage xml -i
176174

src/test_typing_extensions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6887,7 +6887,6 @@ def test_typing_extensions_compiles_with_opt(self):
68876887
self.fail('Module does not compile with optimize=2 (-OO flag).')
68886888

68896889

6890-
68916890
class CoolEmployee(NamedTuple):
68926891
name: str
68936892
cool: int

0 commit comments

Comments
 (0)