Add 64 integration and coverage tests for ValidationPipeline#940
Draft
Add 64 integration and coverage tests for ValidationPipeline#940
Conversation
Adds tests/test_pipeline_and_integration.py with 64 tests covering gaps identified in the PeasyAI test suite: - TestPipelineIntegration (7): Stage 1+2 end-to-end flow, inline-init fixed by post-processor, original_code preserved, validators_run list - TestPipelineCustomisation (9): add/remove_validator, apply_fixes=False, include_test_validators, custom validator list - TestPipelineResultAPI (9): errors/warnings properties, is_valid logic, summary format, to_review_dict shape and backward compat - TestValidatePCodeConvenience (8): validate_p_code() and create_default_pipeline() helpers, full flow with is_test_file - TestSyntaxValidatorBraceSemicolon (5): }; detection, auto-fix - TestMachineStructureValidatorGoto (5): undefined/defined goto, self- loop, empty state INFO, multi-machine validation - TestInputValidationResult (5): success()/failure() factory methods - TestDesignDocValidatorEdgeCases (7): boundary lengths, all sections present, events mentioned, extract_metadata edge cases - TestPipelineErrorHandling (3): crashing validator skipped gracefully, INFO issue recorded, other validators still run - TestValidateFileAndProject (7): validate_file(), validate_project(), PTst path detection, cross-file DuplicateDeclarationValidator context Co-authored-by: ankushdesai <12651260+ankushdesai@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Improve testing methodologies and coverage
Add 64 integration and coverage tests for ValidationPipeline
Mar 14, 2026
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.
The PeasyAI
ValidationPipelinelacked tests for its public API, cross-stage integration, error recovery, and several validator-specific behaviors, leaving core functionality implicitly trusted rather than verified.New test file:
tests/test_pipeline_and_integration.pyEnd-to-end pipeline flow (
TestPipelineIntegration)var x: int = 0;fixed beforeInlineInitValidatorrunsoriginal_codeis never mutated;fixes_appliedandvalidators_runare populated correctlyPipeline customisation (
TestPipelineCustomisation)add_validator/remove_validatormechanicsapply_fixes=False— issues still reported, code unchanged,fixes_appliedemptyinclude_test_validators=TrueaddsTestFileValidator; custom constructor validator list worksPipelineResultpublic API (TestPipelineResultAPI)errors/warningsproperty filtering by severityto_review_dict()backward-compat shape (INFO issues surface in"warnings"key)summary()field presenceConvenience helpers (
TestValidatePCodeConvenience)validate_p_code()andcreate_default_pipeline()round-tripis_test_file=Truefull flow: post-processor generates test declarations; separateapply_fixes=Falsepath exercisesTestFileValidatordirectlyValidator-specific gaps
SyntaxValidator:};detection,auto_fixableflag, fix correctness, occurrence count in messageMachineStructureValidator: goto to undefined state (ERROR), self-loop goto (valid), empty state body (INFO), multi-machine independenceInput validation (
TestInputValidationResult,TestDesignDocValidatorEdgeCases)InputValidationResult.success()/.failure()factoriesDesignDocValidator: exactMIN_LENGTH, exceedingMAX_LENGTH, all required sections present suppresses section warnings,extract_metadataedge casesError recovery (
TestPipelineErrorHandling)File/project helpers (
TestValidateFileAndProject)validate_file()reads from disk; PTst path triggers test-file mode in post-processorvalidate_project()validates all.pfiles; cross-file context enablesDuplicateDeclarationValidatorWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
huggingface.co/tmp/peasyai_venv/bin/pytest /tmp/peasyai_venv/bin/pytest tests/ -v --ignore=tests/pipeline --tb=short -q(dns block)/tmp/peasyai_venv/bin/pytest /tmp/peasyai_venv/bin/pytest tests/ --ignore=tests/pipeline --ignore=tests/rag -v -q -j DROP(dns block)/tmp/peasyai_venv/bin/pytest /tmp/peasyai_venv/bin/pytest tests/ --ignore=tests/pipeline --ignore=tests/rag -q(dns block)If you need me to access, download, or install something from one of these locations, you can either:
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.