We replace the `(testdata)` placeholder with `testutils.abs_datapath()` in a few end2end tests. So far we only needed to replace `(testdata)` with an OS path (e.g. in `tests/end2end/features/spawn.feature`). By introducing `(testdata)` to an end2end test in `tests/end2end/features/hints.feature`, we required a new use case: replacing `(testdata)` as part of a valid file:// URI. ``` When I open file://(testdata)/some/file.txt ``` Replacing `(testdata)` in above BDD step with a plain OS path resulted in invalid URIs, e.g. for the path "C:\\Users" above BDD step results in this invalid URI: ``` When I open file://C:\Users/some/file.txt ``` We deal with this by first isolating the `(testdata)` substitution in a single place. Having `(testdata)` substitutions in a single place, we simply special-case the substitution of file:// paths, which will be part of a URI. Successful substitution for above BDD step looks like the following: ``` When I open file:///C:/Users/some/file.txt ``` |
||
|---|---|---|
| .. | ||
| fixtures.py | ||
| logfail.py | ||
| messagemock.py | ||
| stubs.py | ||
| test_helper_utils.py | ||
| test_logfail.py | ||
| test_stubs.py | ||
| testutils.py | ||