Skip to content

Commit 13f2427

Browse files
[PATCH] part 2 of implementation (- WIP #157 -)
Changes in file tests/context.py: - added imports
1 parent b4da99c commit 13f2427

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/context.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,16 @@
133133
raise ModuleNotFoundError("[CWE-440] profiling Failed to import.") from err
134134

135135

136+
try:
137+
if 'tests.exceptions' not in sys.modules:
138+
import tests.exceptions
139+
else: # pragma: no branch
140+
tests.exceptions = sys.modules["""tests.exceptions"""]
141+
from tests.exceptions import CommandExecutionError
142+
except ImportError as err: # pragma: no branch
143+
raise ModuleNotFoundError("[CWE-440] Test Exceptions Failed to import.") from err
144+
145+
136146
__BLANK = str("""""")
137147
"""
138148
A literally named variable to improve readability of code when using a blank string.

0 commit comments

Comments
 (0)