Skip to content

feat: add independent parser fixtures and tests [$25 BOUNTY]#75

Open
yh-liao-07 wants to merge 1 commit into
weilixiong:mainfrom
yh-liao-07:add-parser-fixtures
Open

feat: add independent parser fixtures and tests [$25 BOUNTY]#75
yh-liao-07 wants to merge 1 commit into
weilixiong:mainfrom
yh-liao-07:add-parser-fixtures

Conversation

@yh-liao-07

Copy link
Copy Markdown

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 lines
  • tests/fixtures/nginx_logs.txt — 10 hand-written nginx access log lines
  • tests/fixtures/text_logs.txt — 10 hand-written plain text/syslog lines
  • tests/test_parser_fixtures.py — 4 test classes with 10 test methods

Test Coverage

  • TestJsonParserFixtures — validates JSON parsing, required fields, error levels
  • TestNginxParserFixtures — validates nginx parsing, status codes
  • TestTextParserFixtures — validates text parsing, severity levels
  • TestParserIndependence — verifies parsers don't share mutable state

This eliminates the false-pass rate issue by providing truly independent test data.

Fixes #5


Automated submission via AI Agent

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[$25 BOUNTY] [Python] Add independent log parser fixtures

1 participant