Skip to content

Expand MetricWriter test coverage #18

@msto

Description

@msto

Source: Expert Software Review (2026-02-17) — Testing for Software Correctness

Description

MetricWriter currently has only 1 test (test_writer in tests/test_metric_writer.py). This covers basic write with the default tab delimiter but leaves several code paths untested.

Acceptance Criteria

  • Test for writing with custom delimiter (delimiter=",")
  • Test for writeall() method standalone
  • Test for writing metrics with field aliases (Field(alias=...))
  • Test for writing metrics with Counter[StrEnum] fields (pivot columns in output)
  • Test for close() behavior (file handle actually closed)
  • Test for context manager exception handling (file closed on error)

Issue ID: ISS-002
Created from: agent_notes/issues/issues_2026-02-17_fgmetric_review.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-generatedCreated by Claude from expert reviewenhancementNew feature or requestpriority:mediumMedium prioritytestingTest coverage and quality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions