feat: support test-groups (#2063)
* feat: support test-groups Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * refactor: address review comments Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * tests: add a integration test Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * Apply suggestions from code review Co-authored-by: Matthieu Darbois <mayeut@users.noreply.github.com> * fix: better error messages based on feedback Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> Co-authored-by: Matthieu Darbois <mayeut@users.noreply.github.com>
This commit is contained in:
co-authored by
Matthieu Darbois
parent
d2c7614c3a
commit
cc1d977359
@@ -22,6 +22,7 @@ environment = {THING = "OTHER", FOO="BAR"}
|
||||
test-command = "pyproject"
|
||||
test-requires = "something"
|
||||
test-extras = ["one", "two"]
|
||||
test-groups = ["three", "four"]
|
||||
|
||||
manylinux-x86_64-image = "manylinux1"
|
||||
|
||||
@@ -60,6 +61,7 @@ def test_simple_settings(tmp_path, platform, fname):
|
||||
== 'THING="OTHER" FOO="BAR"'
|
||||
)
|
||||
assert options_reader.get("test-extras", option_format=ListFormat(",")) == "one,two"
|
||||
assert options_reader.get("test-groups", option_format=ListFormat(" ")) == "three four"
|
||||
|
||||
assert options_reader.get("manylinux-x86_64-image") == "manylinux1"
|
||||
assert options_reader.get("manylinux-i686-image") == "manylinux2014"
|
||||
@@ -85,7 +87,9 @@ def test_envvar_override(tmp_path, platform):
|
||||
"CIBW_MANYLINUX_X86_64_IMAGE": "manylinux_2_24",
|
||||
"CIBW_TEST_COMMAND": "mytest",
|
||||
"CIBW_TEST_REQUIRES": "docs",
|
||||
"CIBW_TEST_GROUPS": "mgroup two",
|
||||
"CIBW_TEST_REQUIRES_LINUX": "scod",
|
||||
"CIBW_TEST_GROUPS_LINUX": "lgroup",
|
||||
},
|
||||
)
|
||||
|
||||
@@ -99,6 +103,10 @@ def test_envvar_override(tmp_path, platform):
|
||||
options_reader.get("test-requires", option_format=ListFormat(" "))
|
||||
== {"windows": "docs", "macos": "docs", "linux": "scod"}[platform]
|
||||
)
|
||||
assert (
|
||||
options_reader.get("test-groups", option_format=ListFormat(" "))
|
||||
== {"windows": "mgroup two", "macos": "mgroup two", "linux": "lgroup"}[platform]
|
||||
)
|
||||
assert options_reader.get("test-command") == "mytest"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user