diff --git a/test/units/ansible_test/test_diff.py b/test/units/ansible_test/test_diff.py index 26ef5226824..72d33bfcab4 100644 --- a/test/units/ansible_test/test_diff.py +++ b/test/units/ansible_test/test_diff.py @@ -5,7 +5,7 @@ import pathlib import pytest import typing as t -if t.TYPE_CHECKING: # pragma: no cover +if t.TYPE_CHECKING: # pragma: nocover # noinspection PyProtectedMember from ansible_test._internal.diff import FileDiff diff --git a/test/units/utils/collection_loader/test_collection_loader.py b/test/units/utils/collection_loader/test_collection_loader.py index 828866b24af..172b4f70aa8 100644 --- a/test/units/utils/collection_loader/test_collection_loader.py +++ b/test/units/utils/collection_loader/test_collection_loader.py @@ -406,7 +406,7 @@ def test_import_from_collection(monkeypatch): original_trace_function = sys.gettrace() trace_log = [] - if original_trace_function: + if original_trace_function: # pragma: nocover # enable tracing while preserving the existing trace function (coverage) def my_trace_function(frame, event, arg): trace_log.append((frame.f_code.co_filename, frame.f_lineno, event)) @@ -419,7 +419,7 @@ def test_import_from_collection(monkeypatch): sys.settrace(my_trace_function) return my_trace_function - else: + else: # pragma: nocover # no existing trace function, so our trace function is much simpler def my_trace_function(frame, event, arg): trace_log.append((frame.f_code.co_filename, frame.f_lineno, event))