diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 10e819d7..e7a287da 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -13,6 +13,7 @@ - change: rename TestCaseInOut field, config_vars and export_vars - change: rename StepData field, export_vars - change: add `--tb=short` for `hrun` command to use shorter traceback format by default +- change: search debugtalk.py upward recursively until system root dir ## 3.0.8 (2020-06-04) diff --git a/httprunner/loader.py b/httprunner/loader.py index ff37c15c..4982eb92 100644 --- a/httprunner/loader.py +++ b/httprunner/loader.py @@ -265,7 +265,7 @@ def load_builtin_functions() -> Dict[Text, Callable]: def locate_file(start_path: Text, file_name: Text) -> Text: """ locate filename and return absolute file path. - searching will be recursive upward until current working directory or system root dir. + searching will be recursive upward until system root dir. Args: file_name (str): target locate file name @@ -289,13 +289,6 @@ def locate_file(start_path: Text, file_name: Text) -> Text: if os.path.isfile(file_path): return os.path.abspath(file_path) - # current working directory - cwd = os.getcwd() - if os.path.abspath(start_dir_path) == cwd: - raise exceptions.FileNotFound( - f"{file_name} not found for {start_path}\ncurrent working directory: {cwd}" - ) - # system root dir # Windows, e.g. 'E:\\' # Linux/Darwin, '/'