MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / test_double_slash_mac

Function test_double_slash_mac

tests_python/test_convert_utilities.py:60–73  ·  view source on GitHub ↗
(monkeypatch)

Source from the content-addressed store, hash-verified

58
59@pytest.mark.skipif(not IS_MAC, reason="Mac-only test.")
60def test_double_slash_mac(monkeypatch):
61 import pydevd_file_utils
62 from pydevd_file_utils import get_path_with_real_case
63
64 def temp_listdir(d):
65 if d == "//":
66 return ["A"]
67 if d == "//A":
68 return ["Bb"]
69 raise AssertionError("Unexpected: %s" % (d,))
70
71 monkeypatch.setattr(pydevd_file_utils, "os_path_exists", lambda *args: True)
72 monkeypatch.setattr(pydevd_file_utils, "os_listdir", temp_listdir)
73 assert get_path_with_real_case(r"//a/bb") == r"//A/Bb"
74
75
76def test_convert_utilities(tmpdir):

Callers

nothing calls this directly

Calls 1

get_path_with_real_caseFunction · 0.90

Tested by

no test coverage detected