| 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 and sharding dependencies. | |
| deps = select({ | |
| "//conditions:default": [], | |
| }), | |
| ) | |
| pytest_test( | |
| name = "pytest_no_randomly_test", | |
| srcs = [ | |
| "basic_test.py", | |
| ], | |
| pytest_randomly = "//python:none", | |
| target_compatible_with = SUPPORTS_BZLMOD, | |
| ) | |
| pytest_test( | |
| name = "pytest_multipy_default_test", | |
| srcs = [ | |
| "basic_test.py", | |
| ], | |
| python_versions = [ | |
| "3.14", | |
| "3.13", | |
| ], | |
| target_compatible_with = SUPPORTS_BZLMOD, | |
| ) |