Add single-stream GritQL test fixture and test harness - #6
Open
covingtron wants to merge 1 commit into
Open
Conversation
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.
Motivation
as_sqliteexample as the input fixture for the forthcomingsingle-streamGritQL rule so the rule can be exercised against a real-world example.afterfixture to represent the requested expected output for the rule.Description
single-streamfixturestests/fixtures/single-stream/before.py(the providedas_sqliteexample) andtests/fixtures/single-stream/after.py(empty expected output)..grit/with.grit/grit.yamland.grit/patterns/inline_single_use_assignment.mdto capture the inline single-use assignment rule.tests/test_patterns.pythat invokes the nativegrit patterns test --verboserunner against a copy of.grit.pyproject.toml,build_backend.py,requirements.txt,.github/workflows/act.yaml,.github/workflows/package.yaml,.gitignore, and.grit/.gitignore) to support running the GritQL tests and building wheels for the bundled Grit CLI.Testing
python -m py_compile tests/fixtures/single-stream/before.py tests/fixtures/single-stream/after.pyand it succeeded.git diff --cached --checkandgit show --check --stat --oneline HEADto validate there are no staged whitespace/errors and both checks completed without errors.pytest-driven GritQL test runner (tests/test_patterns.py) is provided but was not executed in this environment; it expects an installedgritbinary and will be invoked by CI or in a developer environment viapytest.Codex Task