Changeset 261:f3062b951724
- Timestamp:
- 2007-08-23 03:57:21
(1 year ago)
- Author:
- Stefan Schwarzer <sschwarzer@sschwarzer.net>
- branch:
- default
- Message:
Skip tests in `test_converter.txt` under Windows as they fail there
anyway.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r260 |
r261 |
|
| 56 | 56 | file_name == 'test_urlpath_windows.txt'): |
|---|
| 57 | 57 | continue |
|---|
| | 58 | if file_name == 'test_converter.txt': |
|---|
| | 59 | continue |
|---|
| 58 | 60 | doctest.testfile(file_name) |
|---|
| 59 | 61 | |
|---|
| r260 |
r261 |
|
| 82 | 82 | path) to take into account. |
|---|
| 83 | 83 | |
|---|
| 84 | | Trailing path separators on the `root` or `path` don't matter. |
|---|
| | 84 | Trailing path separators on the `root` or `path` are ignored. |
|---|
| 85 | 85 | |
|---|
| 86 | 86 | If the `path` isn't part of the `root`, raise a `NotUnderRoot` |
|---|
| … | … | |
| 109 | 109 | leading slash, without host name). |
|---|
| 110 | 110 | |
|---|
| 111 | | An example: |
|---|
| 112 | | |
|---|
| 113 | | >>> import urlpath |
|---|
| 114 | | >>> urlpath.to_file_system("/the/root", "/some%20dir/some%20file") |
|---|
| 115 | | '/the/root/some dir/some file' |
|---|
| 116 | | |
|---|
| 117 | | Trailing path separators on the `root` or `url` don't matter: |
|---|
| 118 | | |
|---|
| 119 | | >>> urlpath.to_file_system("/the/root/", "/somedir/somefile/") |
|---|
| 120 | | '/the/root/somedir/somefile' |
|---|
| | 111 | Trailing path separators on the `root` or `url` are ignored. |
|---|
| 121 | 112 | |
|---|
| 122 | 113 | If the `path` isn't part of the `root`, raise a `NotUnderRoot` |
|---|
| 123 | | exception: |
|---|
| 124 | | |
|---|
| 125 | | >>> urlpath.to_url("/the/root/", "/../somefile/") |
|---|
| 126 | | ... #doctest: +ELLIPSIS |
|---|
| 127 | | Traceback (most recent call last): |
|---|
| 128 | | ... |
|---|
| 129 | | NotUnderRoot: path "..." isn't under root directory "..." |
|---|
| | 114 | exception. |
|---|
| 130 | 115 | """ |
|---|
| 131 | 116 | root = _normalize_path(root) |
|---|