blob: 3a5beac988e10d7a4f93747943e023029e2662d3 [file]
load("//python:pytest_test.bzl", "pytest_test")
load("//tests/support:support.bzl", "SUPPORTS_BZLMOD")
load(":pytest_test_tests.bzl", "pytest_test_test_suite")
pytest_test_test_suite(name = "pytest_test_tests")
pytest_test(
name = "pytest_script_venv_test",
srcs = [
"basic_test.py",
],
config_settings = {
"@rules_python//python/config_settings:bootstrap_impl": "script",
"@rules_python//python/config_settings:venvs_site_packages": "yes",
},
target_compatible_with = SUPPORTS_BZLMOD,
)
pytest_test(
name = "pytest_default_test",
srcs = [
"basic_test.py",
],
shard_count = 2,
target_compatible_with = SUPPORTS_BZLMOD,
# Verify that pytest_test handles select() expressions in deps when
# appending default dependencies.
deps = select({
"//conditions:default": [],
}),
)
pytest_test(
name = "pytest_optional_deps_test",
srcs = [
"basic_test.py",
],
# Verify explicit plugin target args work with select() in deps without
# duplicating labels when both use //python:none.
pytest_randomly = "//python:none",
pytest_shard = "//python:none",
shard_count = 2,
target_compatible_with = SUPPORTS_BZLMOD,
deps = select({
"//conditions:default": [],
}),
)
pytest_test(
name = "pytest_multipy_default_test",
srcs = [
"basic_test.py",
],
python_versions = [
"3.14",
"3.13",
],
target_compatible_with = SUPPORTS_BZLMOD,
)