mirror of
https://github.com/codeflash-ai/codeflash.git
synced 2026-05-04 18:25:17 +00:00
test: skip test_behavior_return_value_correctness when JAR missing
Same fix as test_comparator.py — uses _find_comparator_jar() to skip when the codeflash-runtime JAR isn't built. Fixes Windows unit-tests which don't have Java pre-installed (unlike Linux runners).
This commit is contained in:
parent
15811c8c03
commit
78372bfbfb
1 changed files with 8 additions and 0 deletions
|
|
@ -13,6 +13,13 @@ from pathlib import Path
|
|||
|
||||
import pytest
|
||||
|
||||
from codeflash.languages.java.comparator import _find_comparator_jar
|
||||
|
||||
requires_java_runtime = pytest.mark.skipif(
|
||||
_find_comparator_jar() is None,
|
||||
reason="codeflash-runtime JAR not found - skipping Java integration tests",
|
||||
)
|
||||
|
||||
from codeflash.discovery.functions_to_optimize import FunctionToOptimize
|
||||
from codeflash.languages.base import Language
|
||||
from codeflash.languages.current import set_current_language
|
||||
|
|
@ -369,6 +376,7 @@ public class AdderMultiTest {
|
|||
assert "testAddPositive" in test_names
|
||||
assert "testAddZero" in test_names
|
||||
|
||||
@requires_java_runtime
|
||||
def test_behavior_return_value_correctness(self, tmp_path):
|
||||
"""Verify the Comparator JAR correctly identifies equivalent vs. differing results.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue