Skip to content

Commit 78372bf

Browse files
committed
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).
1 parent 15811c8 commit 78372bf

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/test_languages/test_java/test_run_and_parse.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313

1414
import pytest
1515

16+
from codeflash.languages.java.comparator import _find_comparator_jar
17+
18+
requires_java_runtime = pytest.mark.skipif(
19+
_find_comparator_jar() is None,
20+
reason="codeflash-runtime JAR not found - skipping Java integration tests",
21+
)
22+
1623
from codeflash.discovery.functions_to_optimize import FunctionToOptimize
1724
from codeflash.languages.base import Language
1825
from codeflash.languages.current import set_current_language
@@ -369,6 +376,7 @@ def test_behavior_multiple_test_methods(self, java_project):
369376
assert "testAddPositive" in test_names
370377
assert "testAddZero" in test_names
371378

379+
@requires_java_runtime
372380
def test_behavior_return_value_correctness(self, tmp_path):
373381
"""Verify the Comparator JAR correctly identifies equivalent vs. differing results.
374382

0 commit comments

Comments
 (0)