Skip to content

test: add GraphSettings isolation fixture and edge case tests#3

Merged
AmitMY merged 1 commit intofix/bugsfrom
test/improvements
Apr 8, 2026
Merged

test: add GraphSettings isolation fixture and edge case tests#3
AmitMY merged 1 commit intofix/bugsfrom
test/improvements

Conversation

@AmitMY
Copy link
Copy Markdown
Contributor

@AmitMY AmitMY commented Apr 8, 2026

Summary

  • Add conftest.py with autouse fixtures that reset GraphSettings and clear singleton cache between tests
  • Add 5 singleton behavior tests (identity, distinctness, cross-class isolation)
  • Add 10 trainer edge case tests (error handling, merge exhaustion, single node, multi-graph, bytes roundtrip)

What improved

  • Tests no longer leak GraphSettings mutations to subsequent tests (was a subtle source of order-dependent failures)
  • Test count: 33 → 48 (+15 new tests)

Test plan

  • All 48 tests pass
  • ruff check . passes

🤖 Generated with Claude Code

- Add conftest.py with autouse fixtures to reset GraphSettings and clear
  singleton cache between tests, preventing cross-test contamination
- Add singleton tests: identity, distinctness, cross-class isolation
- Add trainer tests: error handling, merge exhaustion, single node,
  multiple graphs, readable merge output
- Add characters() bytes roundtrip tests for ASCII and non-ASCII

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@AmitMY AmitMY merged commit 39ee4af into fix/bugs Apr 8, 2026
@AmitMY AmitMY deleted the test/improvements branch April 8, 2026 10:14
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.

1 participant