
- Sublime Text Tutorial
- Sublime Text - Home
- Sublime Text – Introduction
- Sublime Text – Installation
- Sublime Text – Data Directory
- Creating First Document
- Editing First Text Document
- Patterns of Code Editing
- Sublime Text – Sublime Linter
- Sublime Text – Shortcuts
- Sublime Text – Snippets
- Sublime Text – Macros
- Sublime Text – Key Bindings
- Sublime Text – Column Selection
- Sublime Text – Indentation
- Sublime Text – Base Settings
- Sublime Text – Theme Management
- Understanding Vintage Mode
- Sublime Text – Vintage Commands
- Sublime Text – Testing Javascript
- Sublime Text – Testing Python Code
- Sublime Text – Spell Check
- Sublime Text – Packages
- Sublime Text – Menus
- Sublime Text – Sub Menus of Font
- Sublime Text – Developing Plugin
- Sublime Text – Command Palette
- Debugging PHP Application
- Debugging Javascript Application
- Sublime Text – Batch Processing
- Distraction Free Mode
- SublimeCodeIntel Plugin
- Sublime Text Useful Resources
- Sublime Text - Quick Guide
- Sublime Text - Useful Resources
- Sublime Text - Discussion
Sublime Text - Testing Python Code
Python offers unittest, an official unit testing framework for unit testing the scripts designed before deployment. It is also called as PyUnit. Python unit tests used in Sublime Text editor are called as sublime-unittests and they are available in the following link −
https://github.com/martinsam/sublime-unittest
These unit tests contain a number of useful snippets to ease the writing of unit test cases.
Installation of UnitTest
The package control of Sublime manages the installation of unittests and the following steps describe it in detail −
Step 1 − Use the command palette of Sublime Editor Ctrl+Shift+P for installation of the package, as shown in the screenshots given below −



Step 2 − The installed packages use the following two main snippets −
testclass which is used to create a new test class
testfunc which is used to create a new test function for us to fill out
Step 3 − The console computes test results as shown in the screenshot below. Note that the result depends on the success or failure of the test.
Success Result

Failure Result

Note − Unit test cases work as a compiler for computing scripts in python.