Clean up Java test skip markers

- Remove dead `import shutil` from test_comparator.py
- Rename `requires_java` → `requires_java_runtime` for consistency with test_run_and_parse.py
- Remove redundant `@requires_java_runtime` on test_behavior_return_value_correctness (class already has it)
This commit is contained in:
Kevin Turcios 2026-04-09 18:21:23 -05:00
parent e73492f414
commit da536db8a2
2 changed files with 3 additions and 5 deletions

View file

@ -1,6 +1,5 @@
"""Tests for Java test result comparison."""
import shutil
import sqlite3
from pathlib import Path
@ -15,7 +14,7 @@ from codeflash.languages.java.comparator import (
from codeflash.models.models import TestDiffScope
# Skip tests that require the codeflash-runtime JAR (built by Maven from codeflash-java-runtime/)
requires_java = pytest.mark.skipif(
requires_java_runtime = pytest.mark.skipif(
_find_comparator_jar() is None,
reason="codeflash-runtime JAR not found - skipping Comparator integration tests",
)
@ -451,7 +450,7 @@ class TestEdgeCases:
assert equivalent is True
@requires_java
@requires_java_runtime
class TestTestResultsTableSchema:
"""Tests for Java Comparator reading from test_results table schema.
@ -926,7 +925,7 @@ class TestComparatorErrorHandling:
assert diffs[0].scope == TestDiffScope.DID_PASS
@requires_java
@requires_java_runtime
class TestComparatorJavaEdgeCases(TestTestResultsTableSchema):
"""Tests for Java Comparator edge cases that require Java runtime.

View file

@ -377,7 +377,6 @@ 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.