Return an absolute path.
(path)
| 372 | |
| 373 | |
| 374 | def abspath(path): |
| 375 | """Return an absolute path.""" |
| 376 | path = os.fspath(path) |
| 377 | if isinstance(path, bytes): |
| 378 | if not path.startswith(b'/'): |
| 379 | path = join(os.getcwdb(), path) |
| 380 | else: |
| 381 | if not path.startswith('/'): |
| 382 | path = join(os.getcwd(), path) |
| 383 | return normpath(path) |
| 384 | |
| 385 | |
| 386 | # Return a canonical path (i.e. the absolute location of a file on the |
no test coverage detected
searching dependent graphs…