Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions spinnaker_testbase/script_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def _script_path(self, script: str) -> str:
return os.path.join(root_dir, script)

def check_script(self, script: str, broken_msg: Optional[str] = None,
skip_exceptions: Optional[List[type]] = None) -> None:
skip_exceptions: Optional[List[type]] = None,
use_script_dir: bool = True) -> None:
"""
:param script: relative path to the file to run
:param broken_msg:
Expand All @@ -68,7 +69,8 @@ def check_script(self, script: str, broken_msg: Optional[str] = None,
global script_checker_shown

script_path = self._script_path(script)
self._setup(script_path)
if use_script_dir:
self._setup(script_path)
# pylint: disable=import-outside-toplevel
plotting = "import matplotlib.pyplot" in (
open(script_path, encoding="utf-8").read())
Expand Down
Loading