Skip to content

Support TOML as alternative to YAML for test cases #143

@hidai25

Description

@hidai25

What

Allow writing test cases in .toml files in addition to .yaml/.yml.

Why

Some teams prefer TOML (used by pyproject.toml, Rust ecosystem). Supporting it is low-effort since Python 3.11+ has built-in tomllib.

Scope

  • Extend TestCaseLoader to handle .toml files
  • Add .toml to the directory glob pattern
  • Add one example test case in TOML format to docs/examples

Getting Started

  • Loader implementation: evalview/core/loader.py lines 17-64
  • Currently YAML-only: line 32 (yaml.safe_load(f))
  • File glob patterns: line 8-14 (CONFIG_FILE_PATTERNS)
  • Use tomllib (Python 3.11+) or tomli as fallback for 3.9/3.10

Acceptance Criteria

  • .toml test files are loaded alongside .yaml files
  • Existing YAML tests still work (no breaking change)
  • One example .toml test case added
  • Works on Python 3.9+ (use tomli fallback if tomllib unavailable)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions