MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_version

Method test_version

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

Source from the content-addressed store, hash-verified

18 open(fullname, "wb").close()
19
20 def test_version(self):
21 # Test version()
22 with tempfile.TemporaryDirectory() as tmpdir:
23 self.touch(tmpdir, "pip-1.2.3b1-py2.py3-none-any.whl")
24 with unittest.mock.patch.object(ensurepip, '_WHEEL_PKG_DIR', Path(tmpdir)):
25 self.assertEqual(ensurepip.version(), '1.2.3b1')
26
27 def test_version_no_dir(self):
28 # 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