|
1 | 1 | import pytest |
| 2 | +from typing import Any |
2 | 3 |
|
3 | 4 |
|
4 | | -def skip_if_version_less_than(min_version: str): |
| 5 | +def skip_if_version_less_than(min_version: str) -> tuple[Any, ...]: |
5 | 6 | """ |
6 | 7 | Skip tests if version is less than specified minimum. |
7 | 8 |
|
@@ -31,12 +32,15 @@ def skip_if_version_less_than(min_version: str): |
31 | 32 | pytest.mark.parametrize("skip_if_downstream_version_less_than", [min_version], indirect=True), |
32 | 33 | pytest.mark.usefixtures("skip_if_downstream_version_less_than"), |
33 | 34 | ) |
| 35 | + else: |
| 36 | + # For non-downstream distributions, return empty tuple |
| 37 | + return () |
34 | 38 | except Exception as e: |
35 | 39 | print(f"⚠️ Version check setup failed: {e}, proceeding with test") |
36 | 40 | return () |
37 | 41 |
|
38 | 42 |
|
39 | | -def skip_if_version_greater_than(max_version: str): |
| 43 | +def skip_if_version_greater_than(max_version: str) -> tuple[Any, ...]: |
40 | 44 | """ |
41 | 45 | Skip tests if version is greater than specified maximum. |
42 | 46 | - DOWNSTREAM: Uses RHODS version checking |
@@ -64,6 +68,9 @@ def skip_if_version_greater_than(max_version: str): |
64 | 68 | pytest.mark.parametrize("skip_if_downstream_version_greater_than", [max_version], indirect=True), |
65 | 69 | pytest.mark.usefixtures("skip_if_downstream_version_greater_than"), |
66 | 70 | ) |
| 71 | + else: |
| 72 | + # For non-downstream distributions, return empty tuple |
| 73 | + return () |
67 | 74 | except Exception as e: |
68 | 75 | print(f"⚠️ Version check setup failed: {e}, proceeding with test") |
69 | 76 | return () |
0 commit comments