All work

myTest

Pytest for Sublime plugins, headless or inside a live editor.

Source on GitLab Sublime Text · MPL-2.0 · v0.7.0
Stock Sublime
A pytest run's verbose report as plain text: test IDs, PASSED and FAILED, and percentages all the same color.
myTest
The same pytest report with myTest's PytestReport syntax: file paths, test classes, test names, and PASSED/FAILED outcomes each highlighted.

myTest lets Sublime plugin authors run pytest against mocked Sublime APIs outside the editor, or run the same tests inside a live Sublime when real editor behavior matters. As far as I know, it's the first test package for Sublime plugins to use pytest.

It's the test harness behind my whole family of Sublime packages.

A pytest test file is collected once. A plain test runs against myBasis's mocked Sublime APIs headlessly; a test marked pytest.mark.st_only is skipped headlessly and runs only inside a live Sublime Text process. A real headless run of myTest's own suite passed 637 tests and skipped 69; 68 of those are collected under the st_only marker. Test source pytest Two hosts import pytest def test_new_view_is_empty(view): assert view.size() == 0 @pytest.mark.st_only def test_live_view_is_empty(view): assert view.size() == 0 pytest plain st_only Headless mocked $ uv run python -m pytest 637 passed, 69 skipped in 0.63s Live Sublime real $ uv run test-plugin \ --package MyPackage 68 st_only Real run $ pytest -m st_only --collect-only -q 68/706 tests collected