Skip to content

Commit ac7f1b9

Browse files
Remove pytest.importorskip("packaging") usage for transaction/installation tests (#186)
1 parent bebc19a commit ac7f1b9

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

tests/test_install.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ async def test_install_pre(
224224

225225
@pytest.mark.asyncio
226226
async def test_fetch_wheel_fail(monkeypatch, wheel_base):
227-
pytest.importorskip("packaging")
228227
import micropip
229228
from micropip import wheelinfo
230229

tests/test_transaction.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
["http:", "https:", "file:", "emfs:", ""],
2020
)
2121
def test_parse_wheel_url1(protocol, path):
22-
pytest.importorskip("packaging")
2322
from micropip.transaction import WheelInfo
2423

2524
url = protocol + path
@@ -74,7 +73,6 @@ def create_transaction(Transaction):
7473

7574
@pytest.mark.asyncio
7675
async def test_add_requirement(wheel_catalog):
77-
pytest.importorskip("packaging")
7876
from micropip.transaction import Transaction
7977

8078
snowballstemmer_wheel = wheel_catalog.get("snowballstemmer")
@@ -94,7 +92,6 @@ async def test_add_requirement(wheel_catalog):
9492

9593
@pytest.mark.asyncio
9694
async def test_add_requirement_marker(mock_importlib, wheel_base):
97-
pytest.importorskip("packaging")
9895
from micropip.transaction import Transaction
9996

10097
transaction = create_transaction(Transaction)
@@ -130,7 +127,6 @@ async def test_add_requirement_marker(mock_importlib, wheel_base):
130127

131128
@pytest.mark.asyncio
132129
async def test_add_requirement_query_url(mock_importlib, wheel_base, monkeypatch):
133-
pytest.importorskip("packaging")
134130
from micropip.transaction import Transaction
135131

136132
async def mock_add_wheel(self, wheel, extras, *, specifier=""):
@@ -147,7 +143,6 @@ async def mock_add_wheel(self, wheel, extras, *, specifier=""):
147143

148144
@pytest.mark.asyncio
149145
async def test_install_non_pure_python_wheel():
150-
pytest.importorskip("packaging")
151146
from micropip.transaction import Transaction
152147

153148
msg = "Wheel platform 'macosx_10_9_intel' is not compatible with Pyodide's platform"
@@ -188,7 +183,6 @@ def _pypi_metadata(package, versions_to_tags):
188183

189184

190185
def test_last_version_from_pypi():
191-
pytest.importorskip("packaging")
192186
from micropip._vendored.packaging.src.packaging.requirements import Requirement
193187
from micropip.transaction import find_wheel
194188

@@ -208,7 +202,6 @@ def test_find_wheel_invalid_version():
208202
209203
it should be skipped instead of producing an error
210204
"""
211-
pytest.importorskip("packaging")
212205
from micropip._vendored.packaging.src.packaging.requirements import Requirement
213206
from micropip.transaction import find_wheel
214207

@@ -243,7 +236,6 @@ def test_find_wheel_invalid_version():
243236

244237
@pytest.mark.parametrize(*_best_tag_test_cases)
245238
def test_best_tag_from_pypi(package, version, incompatible_tags, compatible_tags):
246-
pytest.importorskip("packaging")
247239
from micropip._vendored.packaging.src.packaging.requirements import Requirement
248240
from micropip.transaction import find_wheel
249241

@@ -277,7 +269,6 @@ def test_best_tag_from_pypi(package, version, incompatible_tags, compatible_tags
277269
def test_last_version_and_best_tag_from_pypi(
278270
package, old_version, new_version, old_tags, new_tags
279271
):
280-
pytest.importorskip("packaging")
281272
from micropip._vendored.packaging.src.packaging.requirements import Requirement
282273
from micropip.transaction import find_wheel
283274

0 commit comments

Comments
 (0)