From 5a414184f24f03c9dd89e38bbfae109d3ef75712 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Thu, 4 Jun 2020 14:34:41 +0800 Subject: [PATCH] change: log current working directory when debugtalk.py not found --- httprunner/loader.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/httprunner/loader.py b/httprunner/loader.py index 4ef030e3..821c9204 100644 --- a/httprunner/loader.py +++ b/httprunner/loader.py @@ -290,8 +290,11 @@ def locate_file(start_path: Text, file_name: Text) -> Text: return os.path.abspath(file_path) # current working directory - if os.path.abspath(start_dir_path) == os.getcwd(): - raise exceptions.FileNotFound(f"{file_name} not found in {start_path}") + 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:\\'