Skip to content

Skip the whole SingleDocumentTestCase3 class - #3108

Merged
rchl merged 2 commits into
mainfrom
test/skip-whole-flaky-class
Nov 1, 2026
Merged

rchl merged 2 commits into
mainfrom
test/skip-whole-flaky-class

Conversation

@rchl

@rchl rchl commented Oct 29, 2026

Copy link
Copy Markdown
Member

SingleDocumentTestCase3 has a single test, which is skipped. unittest still runs setUpClass for a class whose tests are all skipped, so it opened testfile2.txt and started a test server for nothing. Since no test ran, no cleanup closed that view and it stayed open until the end of the run.

Skipping the class instead skips setUpClass and tearDownClass too.

Found while investigating a local-only failure of test_documents.py::test_sends_did_open_to_multiple_sessions. The root cause of that failure is in the UnitTesting Docker runner, which restored views from the previous run's saved session: SublimeText/UnitTesting#309. This PR only removes one source of those views.

main has the same skipped class.

Base automatically changed from feat/asyncio to main October 31, 2026 20:09
Its only test is skipped, but setUpClass still ran, opened testfile2.txt
and started a test server. No test closed that view, so it stayed open
until the end of the run.
@rchl
rchl force-pushed the test/skip-whole-flaky-class branch from ee86487 to 1f62063 Compare October 31, 2026 20:31
@predragnikolic

predragnikolic commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Is this PR needed now when the unit testing PR SublimeText/UnitTesting#309 is merged?

@rchl

rchl commented Nov 1, 2026

Copy link
Copy Markdown
Member Author

It still makes sense to not open a file if the test is skipped. Regardless if it causes any issue.

@rchl
rchl enabled auto-merge (squash) November 1, 2026 09:34
@rchl
rchl merged commit b22fe00 into main Nov 1, 2026
10 checks passed
@rchl
rchl deleted the test/skip-whole-flaky-class branch November 1, 2026 09:36
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.

2 participants