MCPcopy Index your code
hub / github.com/python/cpython / test_list_option

Method test_list_option

Lib/test/test_launcher.py:328–338  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

326 self.assertEqual("True", data["SearchInfo.help"])
327
328 def test_list_option(self):
329 for opt, v1, v2 in [
330 ("-0", "True", "False"),
331 ("-0p", "False", "True"),
332 ("--list", "True", "False"),
333 ("--list-paths", "False", "True"),
334 ]:
335 with self.subTest(opt):
336 data = self.run_py([opt])
337 self.assertEqual(v1, data["SearchInfo.list"])
338 self.assertEqual(v2, data["SearchInfo.listPaths"])
339
340 def test_list(self):
341 data = self.run_py(["--list"])

Callers

nothing calls this directly

Calls 3

run_pyMethod · 0.80
subTestMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected