Skip to content

Commit

Permalink
fix a issue as file or dirortry which is part of data_dir will retrun…
Browse files Browse the repository at this point in the history
… absolute file path

As in misc test repo apply patch is failing which part of data dir as utility return relative path
this patch address as it return absolute file path (file or dir)

Reported-by: Geetika <[email protected]>
Signed-off-by: Praveen K Pandey <[email protected]>
  • Loading branch information
PraveenPenguin committed May 14, 2024
1 parent 17dd26c commit ea8ff4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions avocado/core/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def get_data(self, filename, source=None, must_exist=True):
path,
(f"assumed to be located at " f"{attempt_source} source dir"),
)
return path
return os.path.abspath(path)
else:
if os.path.exists(path):
self.log.debug(
Expand All @@ -211,7 +211,7 @@ def get_data(self, filename, source=None, must_exist=True):
path,
f"found at {attempt_source} source dir",
)
return path
return os.path.abspath(path)

self.log.debug(
log_fmt, filename, "NOT FOUND", f"data sources: {', '.join(sources)}"
Expand Down

0 comments on commit ea8ff4a

Please sign in to comment.