Sublime Text snippets for nose testing.
Install Sublime Package Control if you don't have it.
In the command pallette (Cmd-Shift+P on Mac) type 'Install' then press enter to see a list of packages. Search for 'Python Nose Snippets' then press enter to install.
git clone git://github.com/sloria/sublime-nose-snippets.git ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/Python/sublime-nose-snippets
git clone git://github.com/sloria/sublime-nose-snippets.git %userprofile%\AppData\Roaming\Sublime Text 2\Packages\Python\sublime-nose-snippets
_==expands toassert_equal(first, second)_~=expands toassert_almost_equal(first, second, places=7)_>expands toassert_greater(first, second)_raisesexpands toassert_raises(Exception)testcaseexpands to:
class MODULETest(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_FEATURE(self):
assert False, "Finish me."_==and_!=_~=and_!~=_>,_>=,_<, and_<=_trueand_false_inand_!in_isand_isnot_isnoneand_isnotnone_isinstanceand_!isinstance_raises_matchesand_!matchestestcasenoseboiler(unittest and nose imports + an example TestCase)
Licensed under the WTFPL.