Files
Anton Efimchukandintellij-monorepo-bot 4f5b07293f PY-86778 [python] Migrate Python test environments from local builds to prebuilt standalone distributions
Replace Gradle-based local Python compilation with prebuilt standalone distributions
downloaded from JetBrains cache redirector. Introduces provider-based architecture
for test environment management with improved JUnit4/JUnit5 integration.

Key changes:
- Remove setup-test-environment Gradle module and build infrastructure
- Introduce python-test-env modules (core, common, plain, conda, uv, junit4, junit5)
- Implement PyEnvironmentProvider/PyEnvironmentSpec abstractions
- Add JUnit5 annotations (@RequiresPoetry, @RequiresUv, @RunOnEnvironments)
- Implement caching system with PyEnvDownloadCache and variant-specific directories
- Predefined environments like: VANILLA_2_7, VANILLA_3_11, VANILLA_3_12, VANILLA_3_13

Benefits:
- Faster test environment provisioning (no compilation required)
- Consistent cross-platform behavior with identical Python builds
- Improved reliability by eliminating platform-specific build failures
- Better test framework integration with parameterized environment testing

GitOrigin-RevId: a44957c3014f9e1fc7dbec347a7e245675f999c1
2026-01-10 00:33:44 +00:00

75 lines
2.1 KiB
Python

### auto-generated section `build intellij.python.test.env.core` start
load("@rules_jvm//:jvm.bzl", "jvm_library", "resourcegroup")
resourcegroup(
name = "core_test_resources",
srcs = glob(["gen/**/*"]),
strip_prefix = "gen"
)
resourcegroup(
name = "core_test_resources_1",
srcs = glob(["resources/**/*"]),
strip_prefix = "resources"
)
jvm_library(
name = "core",
visibility = ["//visibility:public"],
srcs = glob([], allow_empty = True),
runtime_deps = [
"@lib//:jetbrains-annotations",
"//python/openapi:community",
"@lib//:kotlin-stdlib",
"//platform/util",
"//platform/projectModel-api:projectModel",
"@lib//:kotlinx-coroutines-core",
"//platform/analysis-api:analysis",
"//platform/core-api:core",
"//python/testFramework",
"@lib//:jackson-module-kotlin",
"@lib//:jackson-databind",
"@lib//:jackson",
"//platform/lang-impl",
"//platform/lang-core",
]
)
jvm_library(
name = "core_test_lib",
module_name = "intellij.python.test.env.core",
visibility = ["//visibility:public"],
srcs = glob(["src/**/*.kt", "src/**/*.java", "src/**/*.form"], allow_empty = True),
resources = [
":core_test_resources",
":core_test_resources_1",
],
deps = [
"@lib//:jetbrains-annotations",
"//python/openapi:community",
"//python/openapi:community_test_lib",
"@lib//:kotlin-stdlib",
"//platform/util",
"//platform/projectModel-api:projectModel",
"@lib//:kotlinx-coroutines-core",
"//platform/analysis-api:analysis",
"//platform/core-api:core",
"//python/testFramework",
"@lib//:jackson-module-kotlin",
"@lib//:jackson-databind",
"@lib//:jackson",
"//platform/lang-impl",
"//platform/lang-core",
],
runtime_deps = [":core"]
)
### auto-generated section `build intellij.python.test.env.core` end
### auto-generated section `test intellij.python.test.env.core` start
load("@community//build:tests-options.bzl", "jps_test")
jps_test(
name = "core_test",
runtime_deps = [":core_test_lib"]
)
### auto-generated section `test intellij.python.test.env.core` end