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:
Kevin Turcios 2026-04-09 15:47:04 -05:00
parent 15811c8c03
commit 78372bfbfb

View file

@ -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.