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

Method test_version

Lib/test/test_ensurepip.py:27–32  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

25 open(fullname, "wb").close()
26
27 def test_version(self):
28 # Test version()
29 with tempfile.TemporaryDirectory() as tmpdir:
30 self.touch(tmpdir, "pip-1.2.3b1-py2.py3-none-any.whl")
31 with unittest.mock.patch.object(ensurepip, '_WHEEL_PKG_DIR', Path(tmpdir)):
32 self.assertEqual(ensurepip.version(), '1.2.3b1')
33
34 def test_version_no_dir(self):
35 # Test version() without a wheel package directory

Callers

nothing calls this directly

Calls 4

touchMethod · 0.95
PathClass · 0.90
assertEqualMethod · 0.45
versionMethod · 0.45

Tested by

no test coverage detected