Skip to content

Commit ea8ff4a

Browse files
fix a issue as file or dirortry which is part of data_dir will retrun 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]>
1 parent 17dd26c commit ea8ff4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

avocado/core/test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def get_data(self, filename, source=None, must_exist=True):
202202
path,
203203
(f"assumed to be located at " f"{attempt_source} source dir"),
204204
)
205-
return path
205+
return os.path.abspath(path)
206206
else:
207207
if os.path.exists(path):
208208
self.log.debug(
@@ -211,7 +211,7 @@ def get_data(self, filename, source=None, must_exist=True):
211211
path,
212212
f"found at {attempt_source} source dir",
213213
)
214-
return path
214+
return os.path.abspath(path)
215215

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

0 commit comments

Comments
 (0)