Skip to content

Commit a57d331

Browse files
committed
chore: coverage workaround
1 parent 7616f7f commit a57d331

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

graphql_server/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -340,12 +340,12 @@ def format_execution_result(
340340
def _check_jinja(jinja_env: Any) -> None:
341341
try:
342342
from jinja2 import Environment
343-
except ImportError:
343+
except ImportError: # pragma: no cover
344344
raise RuntimeError(
345345
"Attempt to set 'jinja_env' to a value other than None while Jinja2 is not installed.\n"
346346
"Please install Jinja2 to render GraphiQL with Jinja2.\n"
347347
"Otherwise set 'jinja_env' to None to use the simple regex renderer."
348348
)
349349

350-
if not isinstance(jinja_env, Environment):
350+
if not isinstance(jinja_env, Environment): # pragma: no cover
351351
raise TypeError("'jinja_env' has to be of type jinja2.Environment.")

graphql_server/render_graphiql.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# and only relevant if rendering GraphiQL with Jinja
99
try:
1010
from jinja2 import Environment
11-
except ImportError:
11+
except ImportError: # pragma: no cover
1212
pass
1313

1414
from typing_extensions import TypedDict

graphql_server/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
if sys.version_info >= (3, 10):
55
from typing import ParamSpec
6-
else:
6+
else: # pragma: no cover
77
from typing_extensions import ParamSpec
88

99

0 commit comments

Comments
 (0)