(prefix, match)
| 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/"] |
no test coverage detected
searching dependent graphs…