From 61bd4ee8ef9d8491687ac5d228a1f42133b13bba Mon Sep 17 00:00:00 2001 From: Denis Anikin Date: Tue, 26 Sep 2023 05:13:01 +0300 Subject: [PATCH] Excluded something --- pyproject.toml | 5 +++++ tests/test_misc.py | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 04947c4..553f4d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,6 +72,11 @@ exclude = ["whole_app/settings.py"] [tool.pytest.ini_options] addopts = "--cov . --cov-report term-missing" +[tool.coverage.report] +exclude_also = [ + "if typing.TYPE_CHECKING", +] + [tool.coverage.run] omit = ["scripts/*"] diff --git a/tests/test_misc.py b/tests/test_misc.py index 44f75c8..4d751e0 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -2,7 +2,6 @@ import os import runpy import typing -from typing import TYPE_CHECKING from fastapi.testclient import TestClient @@ -10,7 +9,7 @@ from whole_app.settings import SETTINGS, SettingsOfMicroservice -if TYPE_CHECKING: +if typing.TYPE_CHECKING: import faker