Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

yini-test-suite

yini-test-suite is the shared command-line test runner and case corpus for YINI parser implementations.

It does not parse YINI itself. Instead, it calls a parser implementation through an adapter, compares the parser output with the expected JSON for each case, and reports pass/fail results consistently.

The goal is to give different YINI parsers the same conformance target.

📦 Install

Requires Python 3.10 or newer.

python -m pip install yini-test-suite

Check that the CLI is available:

yini-test-suite --help

The package includes the shared smoke and golden case corpus, so normal installed usage does not require a separate --cases-root path.

🚀 Basic Usage

Run the smoke suite against a parser adapter:

yini-test-suite smoke --adapter python path/to/adapter.py --input "{input}" --mode "{mode}"

Run all bundled cases in both lenient and strict mode:

yini-test-suite all --all-modes --adapter python path/to/adapter.py --input "{input}" --mode "{mode}"

Important: --adapter must be the last yini-test-suite option. Everything after --adapter is treated as part of the adapter command.

The runner replaces:

  • {input} with the current .yini case path.
  • {mode} with lenient or strict.

Use --show-progress if you also want a RUN line before each case:

yini-test-suite all --all-modes --show-progress --adapter python path/to/adapter.py --input "{input}" --mode "{mode}"

The double quotes around the placeholders make these commands work in Bash, PowerShell, and Windows Command Prompt.

🧪 Suites and modes

Suites:

  • smoke runs a smaller confidence suite.
  • golden runs the broader fixed-output conformance suite.
  • all runs both smoke and golden.

Modes:

  • Lenient mode is the default.
  • --strict runs strict-mode cases.
  • --all-modes runs both lenient and strict mode and prints one combined summary.

🔌 Adapter Contract

An adapter is a small command-line program owned by a parser implementation. It accepts an input file and parser mode, then prints parsed JSON to stdout on success or diagnostics to stderr on failure.

The expected shape is:

adapter --input <path-to-yini-file> --mode <lenient|strict>

For details, see docs/adapter-contract.md.

Official Ecosystem Examples

Parser-specific adapter scripts are maintained in their parser repositories, not in this runner package.

However, this project provides official adapter integrations for yini-parser-typescript and yini-parser-python through ready-made command examples and Taskfile tasks. They are included to show working examples and because those parsers are part of the official YINI ecosystem.

The expected sibling repository layout for those examples is:

YINI-lang-WORK/
  yini-test-suite/
  yini-parser-typescript/
  yini-parser-python/

Example TypeScript adapter command:

yini-test-suite all --all-modes --adapter node ../yini-parser-typescript/dist-tools/tools/yini-test-adapter.js --input "{input}" --mode "{mode}"

Example Python adapter command:

yini-test-suite all --all-modes --adapter python ../yini-parser-python/tools/yini_parser_adapter.py --input "{input}" --mode "{mode}"

When working from the source repository, the matching Taskfile commands are:

task run-all-typescript
task run-all-python

If these runs expose parser or adapter problems, fix those issues in the corresponding parser repository unless the shared case corpus or runner contract is wrong.

Output

A run starts with the runner name and version:

yini-test-suite 0.3.0rc1

Each case is reported as PASS or FAIL, followed by a final summary:

YINI Test Suite Summary
yini-test-suite: 0.3.0rc1
Adapter: yini-parser-typescript
Parser version: 1.6.1
YINI spec: 1.0.0 RC 6
Test suite: "all"

For valid cases, the runner compares the adapter JSON output with the matching expected .json file. Warning cases also check expected warning diagnostics. Invalid cases are expected to fail.

What This Package Does Not Do

  • It does not contain a YINI parser.
  • It does not define parser-specific parsing behavior.
  • It does not make parser-specific adapters part of the public yini-test-suite Python API.

🛠️ Development

For source checkout setup, Taskfile commands, local adapter runs, build checks, and troubleshooting, see docs/Development-Setup.md.

Useful maintainer references:

💬 Help, feedback, and issues

For bugs, feedback, or other issues with yini-test-suite, open an issue.

For general YINI information, see:

About YINI

YINI is a human-readable, INI-inspired, indentation-insensitive configuration format with clear nested sections, explicit structure, and predictable parsing.

yini-lang.org | YINI-lang on GitHub

Metadata

Release files for yini-test-suite 0.3.0rc1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yini-test-suite 0.3.0rc1
File Size Uploaded
yini_test_suite-0.3.0rc1.tar.gz 80.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for yini-test-suite 0.3.0rc1
File Interpreter ABI Platform
yini_test_suite-0.3.0rc1-py3-none-any.whl Python 3 none any Details

Total release size: 329.5 kB

Release files / yini_test_suite-0.3.0rc1.tar.gz

Download URL yini_test_suite-0.3.0rc1.tar.gz
Size 80.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ebb94f5e7e6369169f08bc38ea3e33fec61f5211a1f4952d7ac49f9868c92ed1
BLAKE2b-256 checksum
How to use checksums
1e298e0a0ac33f2976179f115d504b7e554feff669c3fea5a204b1ebbea015d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.0

Release files / yini_test_suite-0.3.0rc1-py3-none-any.whl

Download URL yini_test_suite-0.3.0rc1-py3-none-any.whl
Size 249.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
20d2c6979be0164fd45774013ac634efcbc7f1c6837a22931d1be150287aed03
BLAKE2b-256 checksum
How to use checksums
421dd824d0f8d0975b5a92273127e9fb5d9582e9121022ac1d33929e1281d9ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.0
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page