Skip to content

Commit

Permalink
Resolve file path @ test_get_packages_with_dir
Browse files Browse the repository at this point in the history
  • Loading branch information
webknjaz committed Aug 28, 2023
1 parent c31bdca commit abe7339
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Lib/test/test_ensurepip.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,16 @@ def test_get_packages_with_dir(self):
):
packages = ensurepip._wheelhouses.discover_ondisk_packages()

self.assertEqual(packages['pip'].project_version, '20.2.2')
pip_package = packages['pip']
assert isinstance( # type checker hint
pip_package,
ensurepip._structs.ReplacementDistributionPackage,
)

self.assertEqual(pip_package.project_version, '20.2.2')
self.assertEqual(
packages['pip'].wheel_path,
tmp_path / pip_filename,
pip_package.wheel_path.resolve(),
(tmp_path / pip_filename).resolve(),
)

# wheel package is ignored
Expand Down

0 comments on commit abe7339

Please sign in to comment.