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

Method test_version

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

Source from the content-addressed store, hash-verified

98
99 @support.cpython_only
100 def test_version(self):
101 version = ('Python %d.%d' % sys.version_info[:2]).encode("ascii")
102 for switch in '-V', '--version', '-VV':
103 rc, out, err = assert_python_ok(switch)
104 self.assertNotStartsWith(err, version)
105 self.assertStartsWith(out, version)
106
107 def test_verbose(self):
108 # -v causes imports to write to stderr. If the write to

Callers

nothing calls this directly

Calls 4

assert_python_okFunction · 0.90
assertNotStartsWithMethod · 0.80
assertStartsWithMethod · 0.80
encodeMethod · 0.45

Tested by

no test coverage detected