Created test cases to bring JCodeAnalyzer, JavaAnalysis, and JavaSitter to 90% test coverage #75
Merged
rahlk merged 12 commits intocodellm-devkit:mainfrom Jan 27, 2025
Merged
Conversation
Signed-off-by: John Rofrano <johnnyroy@johnrofrano.com>
Signed-off-by: John Rofrano <johnnyroy@johnrofrano.com>
Signed-off-by: John Rofrano <johnnyroy@johnrofrano.com>
Signed-off-by: John Rofrano <johnnyroy@johnrofrano.com>
Signed-off-by: John Rofrano <johnnyroy@johnrofrano.com>
Signed-off-by: John Rofrano <johnnyroy@johnrofrano.com>
Signed-off-by: John Rofrano <johnnyroy@johnrofrano.com>
Signed-off-by: John Rofrano <johnnyroy@johnrofrano.com>
Signed-off-by: John Rofrano <johnnyroy@johnrofrano.com>
Signed-off-by: John Rofrano <johnnyroy@johnrofrano.com>
Signed-off-by: John Rofrano <johnnyroy@johnrofrano.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This intention of this work is to increase overall test coverage for CLDK. It is still a work in progress but this first PR brings the overall test coverage from 35% to 58%, and for the initial targeted classes up to 90%+. In the process several defects were discovered which will be documented in this separate Issue: Defects uncovered while bringing test coverage for JCodeAnalyzer, JavaAnalysis, and JavaSitter up to 90% #74
Made the following changes:
JCodeAnalyzerto increase coverage from 32% to 91%JavaAnalyzerto increase coverage from 38% to 90%JavaSitterto increase coverage from 30% to 90%analysis.jsonfile from the DayTrader 8 v1.2 source code so that the test code and json are in sync.analysis.jsonfile to be used in Mockingdaytrader8-1.2.zipto the repo and modified PyTest fixture to not delete the file so that test won't fail if it can't be downloadedJavaAnalysisclass filename fromjava.pytojava_analysis.pyto be PEP8 complianceJavaSitterclass filename fromjavasitter.pytojava_sitter.pyto be PEP8 compliantTODOs
16 of the test cases currently fail due to defects in the code but many can be traced back to the same error in underlying libraries so they should be easy to fix.
Here is the list of the failures which can be see by running:
pytest: