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

Method test_help_env

Lib/test/test_cmd_line.py:60–70  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

58
59 @support.cpython_only
60 def test_help_env(self):
61 out = self.verify_valid_flag('--help-env')
62 self.assertIn(b'PYTHONHOME', out)
63 # Env vars in each section should be sorted alphabetically
64 # (ignoring underscores so PYTHON_FOO and PYTHONFOO intermix naturally)
65 sort_key = lambda name: name.replace(b'_', b'').lower()
66 sections = out.split(b'These variables have equivalent')
67 for section in sections:
68 envvars = re.findall(rb'^(PYTHON\w+)', section, re.MULTILINE)
69 self.assertEqual(envvars, sorted(envvars, key=sort_key),
70 "env vars should be sorted alphabetically")
71
72 @support.cpython_only
73 def test_help_xoptions(self):

Callers

nothing calls this directly

Calls 7

verify_valid_flagMethod · 0.95
assertInMethod · 0.80
lowerMethod · 0.45
replaceMethod · 0.45
splitMethod · 0.45
findallMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected