Skip to content

Commit

Permalink
Add python test snippets for assertIsNone and assertIsNotNone
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal committed Jul 25, 2014
1 parent 0073aba commit c6983fc
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions UltiSnips/python.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ class Arg(object):
def __str__(self):
return self.name
def __unicode__(self):
return self.name
def is_kwarg(self):
return '=' in self.arg
Expand Down Expand Up @@ -560,6 +560,13 @@ snippet ar "Assert raises" b
self.assertRaises(${1:exception}, ${2:func}${3/.+/, /}${3:arguments})
endsnippet

snippet an "Assert is None" b
self.assertIsNone(${0:expression})
endsnippet

snippet ann "Assert is not None" b
self.assertIsNotNone(${0:expression})
endsnippet

snippet testcase "pyunit testcase" b
class Test${1:Class}(${2:unittest.TestCase}):
Expand Down

0 comments on commit c6983fc

Please sign in to comment.