feat: add independent parser fixtures and tests [$25 BOUNTY]#75
Open
yh-liao-07 wants to merge 1 commit into
Open
feat: add independent parser fixtures and tests [$25 BOUNTY]#75yh-liao-07 wants to merge 1 commit into
yh-liao-07 wants to merge 1 commit into
Conversation
Added hand-written representative log lines for three formats: - JSON log fixture (10 lines) - Nginx access log fixture (10 lines) - Plain text/syslog fixture (10 lines) Added test_parser_fixtures.py with: - TestJsonParserFixtures - TestNginxParserFixtures - TestTextParserFixtures - TestParserIndependence These fixtures are independent of parser-generated samples, eliminating the false-pass rate issue. Fixes weilixiong#5
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.
Independent Parser Fixtures
Added hand-written representative log lines that validate parsers without relying on parser-generated samples:
Files Added
tests/fixtures/json_logs.txt— 10 hand-written JSON log linestests/fixtures/nginx_logs.txt— 10 hand-written nginx access log linestests/fixtures/text_logs.txt— 10 hand-written plain text/syslog linestests/test_parser_fixtures.py— 4 test classes with 10 test methodsTest Coverage
TestJsonParserFixtures— validates JSON parsing, required fields, error levelsTestNginxParserFixtures— validates nginx parsing, status codesTestTextParserFixtures— validates text parsing, severity levelsTestParserIndependence— verifies parsers don't share mutable stateThis eliminates the false-pass rate issue by providing truly independent test data.
Fixes #5
Automated submission via AI Agent