MCPcopy
hub / github.com/pytest-dev/pytest / equal_with_bash

Function equal_with_bash

testing/test_argcomplete.py:15–24  ·  testing/test_argcomplete.py::equal_with_bash
(prefix, ffc, fc, out=None)

Source from the content-addressed store, hash-verified

13
14
15def equal_with_bash(prefix, ffc, fc, out=None):
16 res = ffc(prefix)
17 res_bash = set(fc(prefix))
18 retval = set(res) == res_bash
19 if out:
20 out.write(fclass="st">"equal_with_bash({prefix}) {retval} {res}\n")
21 if not retval:
22 out.write(class="st">" python - bash: %s\n" % (set(res) - res_bash))
23 out.write(class="st">" bash - python: %s\n" % (res_bash - set(res)))
24 return retval
25
26
27class="cm"># Copied from argcomplete.completers as import from there.

Callers 2

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected