Skip to content

Commit 2972c04

Browse files
henryiiiLecrisUT
authored andcommitted
tests: parametrize on data package
Signed-off-by: Henry Schreiner <[email protected]>
1 parent a28a8e6 commit 2972c04

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

tests/test_editable.py

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,38 @@
1+
import sys
2+
from pathlib import Path
3+
14
import pytest
25

36

47
@pytest.mark.compile()
58
@pytest.mark.configure()
69
@pytest.mark.integration()
7-
@pytest.mark.parametrize("isolate", [True, False])
10+
@pytest.mark.parametrize("isolate", [True, False], ids=["isolated", "notisolated"])
11+
@pytest.mark.parametrize(
12+
"package",
13+
[
14+
pytest.param(
15+
True,
16+
id="package",
17+
marks=[pytest.mark.xfail(reason="Only data folders supported currently")],
18+
),
19+
pytest.param(False, id="datafolder"),
20+
],
21+
)
822
@pytest.mark.usefixtures("navigate_editable")
9-
def test_navigate_editable(isolated, isolate):
23+
@pytest.mark.xfail(
24+
sys.version_info[:2] == (3, 9), reason="Python 3.9 not supported yet"
25+
)
26+
def test_navigate_editable(isolated, isolate, package):
1027
isolate_args = ["--no-build-isolation"] if not isolate else []
1128
isolated.install("pip>=23")
1229
if not isolate:
1330
isolated.install("scikit-build-core[pyproject]")
1431

32+
if package:
33+
init_py = Path("python/shared_pkg/data/__init__.py")
34+
init_py.touch()
35+
1536
isolated.install(
1637
"-v", "--config-settings=build-dir=build/{wheel_tag}", *isolate_args, "-e", "."
1738
)

0 commit comments

Comments
 (0)