subl/test
myTest Sublime Plugin
A Modern PyTest-Backed Testing Framework for Sublime Plugins
sublime-test runs pytest inside a live Sublime Text 4 instance — headless where mocks suffice, live where they don't — and streams results back to the terminal.
Preview not recorded.
What it shows
What it is and what it demonstrates.
myTest runs pytest inside a live Sublime Text 4 instance — headless where mocks suffice, live where they don't — and streams results back to the terminal. It gives Sublime plugin authors the same test-against-the-real-thing discipline that web and server developers take for granted.
The problem
Sublime plugins run inside an embedded Python interpreter with no standard test harness. The usual options are unit tests that mock the entire Sublime API (fast but blind to real-editor behavior) or manual trial-and-error in a running window. Neither catches the integration bugs that only surface when a plugin touches actual view state, selections, or settings.
The approach
myTest bridges the two modes: it ships a pytest runner that can execute inside a real Sublime instance via its plugin host, falling back to a headless mock layer for tests that don't need the editor. Results stream back to the calling terminal with standard pytest output, so CI and local workflows are identical. The mockable API surface comes from sublime-basis, keeping the test infrastructure itself testable.
What it demonstrates
A published 0.7.0 package with 25 tests, CI, pre-commit hooks, typed source, and 4 documentation pages brings software-engineering testing discipline to a plugin ecosystem where most projects have none. The headless/live split shows the same pragmatism as any well-factored test suite: mock what you can, integrate what you must.
Repository evidence
Observable facts.
- Documentation
- 4 documentation files
- Test surface
- 25 test files
- Continuous integration
- Configured
- Pre-commit hooks
- Configured
- Typed source
- Configured
- Visual evidence
- Preview stub
- Technologies
- sublime