(self)
| 53 | self.assertEqual(pip_filename, bundled_wheel_path.name) |
| 54 | |
| 55 | def test_selected_wheel_path_with_dir(self): |
| 56 | # Test _get_pip_whl_path_ctx() with a wheel package directory |
| 57 | pip_filename = "pip-20.2.2-py2.py3-none-any.whl" |
| 58 | |
| 59 | with tempfile.TemporaryDirectory() as tmpdir: |
| 60 | self.touch(tmpdir, pip_filename) |
| 61 | # not used, make sure that they're ignored |
| 62 | self.touch(tmpdir, "pip-1.2.3-py2.py3-none-any.whl") |
| 63 | self.touch(tmpdir, "wheel-0.34.2-py2.py3-none-any.whl") |
| 64 | self.touch(tmpdir, "pip-script.py") |
| 65 | |
| 66 | with unittest.mock.patch.object(ensurepip, '_WHEEL_PKG_DIR', Path(tmpdir)): |
| 67 | with ensurepip._get_pip_whl_path_ctx() as bundled_wheel_path: |
| 68 | self.assertEqual(pip_filename, bundled_wheel_path.name) |
| 69 | |
| 70 | |
| 71 | class EnsurepipMixin: |
nothing calls this directly
no test coverage detected