mirror of
https://github.com/codeflash-ai/codeflash.git
synced 2026-05-04 18:25:17 +00:00
test: fix requires_java to check for runtime JAR, not just binaries
Ubuntu runners have Java/Maven pre-installed, so checking for java/mvn binaries doesn't skip. The actual dependency is the codeflash-runtime JAR which must be built from codeflash-java-runtime/ via Maven.
This commit is contained in:
parent
241fd2d59c
commit
e5a18feb61
1 changed files with 9 additions and 4 deletions
|
|
@ -6,13 +6,18 @@ from pathlib import Path
|
|||
|
||||
import pytest
|
||||
|
||||
from codeflash.languages.java.comparator import compare_invocations_directly, compare_test_results, values_equal
|
||||
from codeflash.languages.java.comparator import (
|
||||
_find_comparator_jar,
|
||||
compare_invocations_directly,
|
||||
compare_test_results,
|
||||
values_equal,
|
||||
)
|
||||
from codeflash.models.models import TestDiffScope
|
||||
|
||||
# Skip tests that require Java runtime if Java is not available
|
||||
# Skip tests that require the codeflash-runtime JAR (built by Maven from codeflash-java-runtime/)
|
||||
requires_java = pytest.mark.skipif(
|
||||
shutil.which("java") is None or shutil.which("mvn") is None,
|
||||
reason="Java/Maven not found - skipping Comparator integration tests",
|
||||
_find_comparator_jar() is None,
|
||||
reason="codeflash-runtime JAR not found - skipping Comparator integration tests",
|
||||
)
|
||||
|
||||
# Kryo-serialized bytes for common test values.
|
||||
|
|
|
|||
Loading…
Reference in a new issue