8000 Merge pull request #134 from codellm-devkit/model-validation-test-fix… · codellm-devkit/python-sdk@f036632 · GitHub
[go: up one dir, main page]

Skip to content

Commit f036632

Browse files
authored
Merge pull request #134 from codellm-devkit/model-validation-test-fixture-updates
Model validation test fixture updates
2 parents 4aeffc6 + d6a3a6d commit f036632

File tree

12 files changed

+39278
-38287
lines changed

12 files changed

+39278
-38287
lines changed

cldk/models/java/models.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,11 +436,10 @@ def validate_source(cls, value) -> JMethodDetail:
436436
j_callable: JCallable = _CALLABLES_LOOKUP_TABLE.get(
437437
(type_declaration, signature),
438438
JCallable(
439-
comments=[],
440439
signature=signature,
441440
is_implicit=True,
442441
is_constructor="<init>" in value["callable_declaration"],
443-
comment="",
442+
comments=[],
444443
annotations=[],
445444
modifiers=[],
446445
thrown_exceptions=[],
@@ -449,12 +448,15 @@ def validate_source(cls, value) -> JMethodDetail:
449448
JCallableParameter(name=None, type=t, annotations=[], modifiers=[], start_column=-1, end_column=-1, start_line=-1, end_line=-1)
450449
for t in value["callable_declaration"].split("(")[1].split(")")[0].split(",")
451450
],
451+
return_type=None,
452452
code="",
453453
start_line=-1,
454454
end_line=-1,
455+
code_start_line=-1,
455456
referenced_types=[],
456457
accessed_fields=[],
457458
call_sites=[],
459+
is_entrypoint=False,
458460
variable_declarations=[],
459461
crud_operations=[],
460462
crud_queries=[],

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,4 @@ directory = "coverage_html_report"
120120
sample-c-application = "tests/resources/c/application/"
121121
sample-application = "tests/resources/java/application/"
122122
sample-application-analysis-json = "tests/resources/java/analysis_json/"
123-
codeanalyzer-jar-path = "tests/resources/java/codeanalyzer_jars/"
123+
codeanalyzer-jar-path = "cldk/analysis/java/codeanalyzer/jar/"

tests/analysis/java/test_java_analysis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,11 +650,11 @@ def test_get_methods_in_class(test_fixture, analysis_json):
650650
eager_analysis=False,
651651
)
652652

653-
# Test that there are 30 methods in the Log class
653+
# Test that there are 29 methods in the Log class
654654
methods = java_analysis.get_methods_in_class("com.ibm.websphere.samples.daytrader.util.Log")
655655
assert methods is not None
656656
assert isinstance(methods, Dict)
657-
assert len(methods) == 30
657+
assert len(methods) == 29
658658
for method in methods:
659659
assert isinstance(methods[method], JCallable)
660660

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def codeanalyzer_jar_path():
7575
# Load the configuration
7676
config = toml.load(pyproject_path)
7777

78-
return Path(config["tool"]["cldk"]["testing"]["codeanalyzer-jar-path"]) / "2.3.0"
78+
return Path(config["tool"]["cldk"]["testing"]["codeanalyzer-jar-path"])
7979

8080

8181
@pytest.fixture(scope="session", autouse=True)

0 commit comments

Comments
 (0)
0