MCPcopy Index your code
hub / github.com/RustPython/RustPython / skip_if_ABSTFN_contains_backslash

Function skip_if_ABSTFN_contains_backslash

Lib/test/test_posixpath.py:27–35  ·  view source on GitHub ↗

On Windows, posixpath.abspath still returns paths with backslashes instead of posix forward slashes. If this is the case, several tests fail, so skip them.

(test)

Source from the content-addressed store, hash-verified

25ABSTFN = abspath(TESTFN)
26
27def skip_if_ABSTFN_contains_backslash(test):
28 """
29 On Windows, posixpath.abspath still returns paths with backslashes
30 instead of posix forward slashes. If this is the case, several tests
31 fail, so skip them.
32 """
33 found_backslash = '\\' in ABSTFN
34 msg = "ABSTFN is not a posix path - tests fail"
35 return [test, unittest.skip(msg)(test)][found_backslash]
36
37
38def _parameterize(*parameters):

Callers

nothing calls this directly

Calls 1

skipMethod · 0.45

Tested by

no test coverage detected