MCPcopy
hub / github.com/mitmproxy/mitmproxy / normPathOpts

Function normPathOpts

test/mitmproxy/test_types.py:96–102  ·  view source on GitHub ↗
(prefix, match)

Source from the content-addressed store, hash-verified

94 assert b.is_valid(tctx.master.commands, mitmproxy.types.Path, 3) is False
95
96 def normPathOpts(prefix, match):
97 ret = []
98 for s in b.completion(tctx.master.commands, mitmproxy.types.Path, match):
99 s = s[len(prefix) :]
100 s = s.replace(os.sep, "/")
101 ret.append(s)
102 return ret
103
104 cd = os.path.normpath(tdata.path("mitmproxy/completion"))
105 assert normPathOpts(cd, cd) == ["/aaa", "/aab", "/aac", "/bbb/"]

Callers 1

test_pathFunction · 0.85

Calls 3

completionMethod · 0.45
replaceMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…