(filename, func, os_path_exists=os_path_exists)
| 471 | |
| 472 | |
| 473 | def _get_relative_filename_abs_path(filename, func, os_path_exists=os_path_exists): |
| 474 | # If we have a relative path and the file does not exist when made absolute, try to |
| 475 | # resolve it based on the sys.path entries. |
| 476 | for p in sys.path: |
| 477 | r = func(os.path.join(p, filename)) |
| 478 | if os_path_exists(r): |
| 479 | return r |
| 480 | |
| 481 | # We couldn't find the real file for the relative path. Resolve it as if it was in |
| 482 | # a library (so that it's considered a library file and not a project file). |
| 483 | r = func(os.path.join(_library_dir, filename)) |
| 484 | return r |
| 485 | |
| 486 | |
| 487 | def _apply_func_and_normalize_case(filename, func, isabs, normalize_case, os_path_exists=os_path_exists, join=join): |
no test coverage detected