Our plugin has grown up to 1500+ lines of code, and now I'm literally scared of performing any refactorings. When doing any non-trivial reshaping of the codebase I have a big chance to screw up, forget to rename something and introduce a regression.

How are you dealing with this folks? Manual testing is too time-consuming and quite error-prone, so the first reaction is to write unit tests. But how exactly do you write unit tests for a Sublime plugin?

Testing plugins, while it can be a bit of a pita with the api being mostlyasync, is definitely doable. If you are familiar with nose tests framework thecode excerpt below is a way you can use it to run unit tests on plugin<em>re</em>load

# Nosetry: import noseexceptImportError: nose =None

################ ONLY LOAD TESTS WHEN DEVELOPING NOT ON START UP ###############