Skip to content

Commit 09570a3

Browse files
committed
ite
1 parent 493e619 commit 09570a3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

imblearn/utils/tests/test_min_dependencies.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,20 @@
66
from pathlib import Path
77

88
import pytest
9-
import tomllib
109
from packaging.requirements import Requirement
1110
from packaging.version import parse
1211

1312
import imblearn
1413

1514

1615
@pytest.mark.skipif(
17-
platform.system() == "Windows", reason="This test is enough on unix system"
16+
platform.system() == "Windows" or parse(platform.python_version()) < parse("3.11"),
17+
reason="This test is enough on unix system and requires Python >= 3.11",
1818
)
1919
def test_min_dependencies_readme():
20+
# local import to not import the file with Python < 3.11
21+
import tomllib
22+
2023
# Test that the minimum dependencies in the README.rst file are
2124
# consistent with the minimum dependencies defined at the file:
2225
# pyproject.toml

0 commit comments

Comments
 (0)