Skip to content

test: Strengthen example validation with AST checks. #257

@nedseb

Description

@nedseb

Description

The current test_examples.py validates syntax and import consistency but cannot catch runtime errors like undefined names (MENU_BUTTON in dpad_piano.py was a recent example).

Tasks

  • Add an AST check to detect obvious undefined global names in examples
  • Target lib/*/examples/*.py
  • Consider a mode with a fake machine module for import/initialisation validation when the example is compatible
  • Integrate into make test-examples and CI

Priority

P0 — prevents broken examples from being merged

Related

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions