Skip to content

test fixtures: improve forkchoice construction#398

Merged
tcoratger merged 3 commits intoleanEthereum:mainfrom
tcoratger:test-fixtures-improvements
Feb 14, 2026
Merged

test fixtures: improve forkchoice construction#398
tcoratger merged 3 commits intoleanEthereum:mainfrom
tcoratger:test-fixtures-improvements

Conversation

@tcoratger
Copy link
Collaborator

@tcoratger tcoratger commented Feb 13, 2026

🗒️ Description

In the test fixtures, I've tried to refactor a bit in order to use more the spec directly instead of manual constructions.

🔗 Related Issues or PRs

✅ Checklist

  • Ran tox checks to avoid unnecessary CI fails:
    uvx tox
  • Considered adding appropriate tests for the changes.
  • Considered updating the online docs in the ./docs/ directory.

Copy link
Contributor

@fselmo fselmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Framework changes are an improvement 👌🏼. I'll defer to you on the logic but, on a superficial pass, these makes sense as well 👍🏼

Copy link
Collaborator

@unnawut unnawut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah moving away from manual constructions is great, just one comment on readability

- Test files/functions must start with `test_`
- **No example code in docstrings**: Do not include `Example:` sections with code blocks in docstrings. Keep documentation concise and focused on explaining *what* and *why*, not *how to use*. Unit tests serve as usage examples.
- **No section separator comments**: Never use banner-style separator comments (`# ====...`, `# ----...`, or similar). They add visual clutter with no value. Use blank lines to separate logical sections. If a section needs a heading, a single `#` comment line is enough.
- **CRITICAL - Preserve existing documentation**: When refactoring or modifying code, NEVER remove or rewrite existing comments and docstrings unless they are directly invalidated by the code change. Removing documentation that still applies creates unnecessary noise in code review diffs and destroys context that was carefully written. Only modify documentation when:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah this has been quite annoying so far

@tcoratger tcoratger merged commit 89d1688 into leanEthereum:main Feb 14, 2026
11 checks passed
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.

3 participants