Skip to content

Commit f8e2bef

Browse files
committed
fix: Tests were broken by wheel>=0.46.2 release
`wheel` package 0.46 moved the `cli` sub-package into a private namespace. Import `WheelError` from `wheel.wheelfile`. The change is backwards compatible with older versions. Signed-off-by: Christian Heimes <cheimes@redhat.com>
1 parent 9b57894 commit f8e2bef

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/test_wheels.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from unittest.mock import Mock, patch
44

55
import pytest
6-
import wheel.cli # type: ignore
6+
import wheel.wheelfile # type: ignore
77
from packaging.requirements import Requirement
88
from packaging.version import Version
99

@@ -21,7 +21,7 @@ def test_invalid_wheel_file_exception(
2121
text_file = fake_dir / "fake_wheel.txt"
2222
text_file.write_text("This is a test file")
2323
req = Requirement("test_pkg")
24-
with pytest.raises(wheel.cli.WheelError):
24+
with pytest.raises(wheel.wheelfile.WheelError):
2525
wheels._download_wheel_check(req, fake_dir, fake_url)
2626

2727

0 commit comments

Comments
 (0)