Skip to content

Commit e4c3d30

Browse files
committed
test: mark some uncovered lines in collector.py
1 parent 4a5cf28 commit e4c3d30

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

coverage/collector.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from coverage.tracer import CTracer, CFileDisposition
2222
except ImportError:
2323
# Couldn't import the C extension, maybe it isn't built.
24-
if os.getenv('COVERAGE_TEST_TRACER') == 'c':
24+
if os.getenv('COVERAGE_TEST_TRACER') == 'c': # pragma: part covered
2525
# During testing, we use the COVERAGE_TEST_TRACER environment variable
2626
# to indicate that we've fiddled with the environment to test this
2727
# fallback code. If we thought we had a C tracer, but couldn't import
@@ -411,15 +411,15 @@ def mapped_file_dict(self, d):
411411
# in other threads. We try three times in case of concurrent
412412
# access, hoping to get a clean copy.
413413
runtime_err = None
414-
for _ in range(3):
414+
for _ in range(3): # pragma: part covered
415415
try:
416416
items = list(d.items())
417-
except RuntimeError as ex:
417+
except RuntimeError as ex: # pragma: cant happen
418418
runtime_err = ex
419419
else:
420420
break
421421
else:
422-
raise runtime_err
422+
raise runtime_err # pragma: cant happen
423423

424424
return {self.cached_mapped_file(k): v for k, v in items if v}
425425

0 commit comments

Comments
 (0)