Skip to content
Myr

fix symlink tests

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by chima · committed by chima · parent 7e6a98f · Browse files · 1 file+9 added−11 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+9 added−11 removed

  • tests:+9 added−11 removed

1 file+9 added−11 removed

modified:tests/test_types.py+9 added-11 removed
125 unmodified lines
126 # test127 ctx = click.Context(click.Command("do_stuff"))128 rv = click.Path(resolve_path=True).convert(sym_path, None, ctx)129130 if os.path.isabs(rv):131 # os.readlink prepends path prefixes to absolute132 # links in windows.133 # https://docs.microsoft.com/en-us/windows/win32/134 # ... fileio/naming-a-file#win32-file-namespaces135 #136 # Here we strip win32 path prefix from the resolved path137 rv_drive, rv_path = os.path.splitdrive(rv)138 stripped_rv_drive = rv_drive.split(os.path.sep)[-1]139 rv = os.path.join(stripped_rv_drive, rv_path)130 # os.readlink prepends path prefixes to absolute131 # links in windows.132 # https://docs.microsoft.com/en-us/windows/win32/133 # ... fileio/naming-a-file#win32-file-namespaces134 #135 # Here we strip win32 path prefix from the resolved path136 rv_drive, rv_path = os.path.splitdrive(rv)137 stripped_rv_drive = rv_drive.split(os.path.sep)[-1]138 rv = os.path.join(stripped_rv_drive, rv_path)139141 assert pathlib.Path(rv) == pathlib.Path(real_path)140 assert rv == real_path