Skip to content

Commit 86c0c49

Browse files
committed
chore: coverage workaround
1 parent 3484ca4 commit 86c0c49

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

graphql_server/__init__.py

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

0 commit comments

Comments
 (0)