Skip to content

toon: 5 correctness tests fail against the current toon-format reference (CI installs it unpinned from git) #183

Closed

Description

@clementine-oaklight

What

Five toon correctness tests fail in CI on Python 3.11, 3.12 and 3.13. The failures do not involve any repo change: the CI installs the reference library from an unpinned git ref, and that reference has moved.

FAILED toon/test_toon_correctness.py::TestEncodeArrays::test_empty_array
FAILED toon/test_toon_correctness.py::TestEncodeOptions::test_tab_delimiter
FAILED toon/test_toon_correctness.py::TestEncodeOptions::test_pipe_delimiter
FAILED toon/test_toon_correctness.py::TestComplexStructures::test_mixed_nested_arrays
FAILED toon/test_toon_correctness.py::TestCrossImplementation::test_decode_ref_encoded[empty-array]
5 failed, 7523 passed, 34 skipped, 7 xfailed in 55.45s

Why this is environment drift, not a regression

toon/ is byte-identical to master in the run where this appeared (git diff --stat 46a0426 <head> -- toon/ is empty). The same five tests fail locally with only the reference library installed the way CI installs it:

pip install "toon_format @ git+https://github.com/toon-format/toon-python.git"   # -> toon_format 1.1.0
pytest toon/test_toon_correctness.py -q
# 5 failed, 110 passed

The two shapes of failure both point at the reference, not at our module:

  • TypeError: dumps() takes 1 positional argument but 2 were given — the tests call _tf.encode(obj, {"delimiter": "\t"}), and the current reference exposes a one-argument dumps.
  • Encoding mismatches, e.g. empty array: ours '[0]:' vs theirs '[]', and a nested array: ours '[2]:\n - name: A\n...' vs theirs '[2]{name,data{x}}:\n A,1\n B,2' — the reference changed its tabular encoding.

pyproject.toml declares bench-toon = ["toon-format>=0.9.0b1"], and .github/workflows/lint-test.yml deliberately excludes bench-toon from the extras install and pulls it from git main instead, so the reference floats with upstream.

Impact

Master's last green CI run was 2026-09-28 (36380174333). Every PR opened since is red for this reason, including #182 and #171. The 3.10 job passes only because most reference extras do not resolve there: it collects 2638 items against 7529 on 3.11, so the toon comparison tests never run.

Options

Both are a call on which side is authoritative, so this is left open:

  1. Pin the reference in the CI step (and/or the bench-toon extra) to the version the module was written against, and raise it deliberately when the module is updated.
  2. Update toon/toon.py and toon/test_toon_correctness.py to the current reference API and encoding, which looks like a real spec change rather than a rename.

Environment: run 38358964727, Python 3.11.17, toon_format 1.1.0 from git main, 2026-10-13.

Activity

  1. added a commit that references this issue on Oct 13, 2026
    9faed67
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions