MCPcopy Create free account
hub / github.com/pytest-dev/pytest / equal_with_bash

Function equal_with_bash

testing/test_argcomplete.py:11–20  ·  view source on GitHub ↗
(prefix, ffc, fc, out=None)

Source from the content-addressed store, hash-verified

9
10
11def equal_with_bash(prefix, ffc, fc, out=None):
12 res = ffc(prefix)
13 res_bash = set(fc(prefix))
14 retval = set(res) == res_bash
15 if out:
16 out.write(f"equal_with_bash({prefix}) {retval} {res}\n")
17 if not retval:
18 out.write(" python - bash: %s\n" % (set(res) - res_bash))
19 out.write(" bash - python: %s\n" % (res_bash - set(res)))
20 return retval
21
22
23# Copied from argcomplete.completers as import from there.

Callers 2

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected