mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-13 17:29:56 +08:00
change: search debugtalk.py upward recursively until system root dir
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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, '/'
|
||||
|
||||
Reference in New Issue
Block a user