From f9528c99e646e935db034b3d1fa1cdae6a68d9b9 Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Fri, 25 Jul 2014 15:46:43 -0300 Subject: [PATCH] more python snippets --- UltiSnips/python.snippets | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/UltiSnips/python.snippets b/UltiSnips/python.snippets index d54488e..d4f1519 100644 --- a/UltiSnips/python.snippets +++ b/UltiSnips/python.snippets @@ -1,8 +1,9 @@ snippet #py "Set the python environment." #!/usr/bin/env python -#-*- encoding: utf-8 +# -*- encoding: utf-8 -*- """${1:Module documentation}""" + $0 endsnippet @@ -20,7 +21,6 @@ endsnippet snippet from "Import a module from another" from ${1:source} import ${2:module} -$0 endsnippet snippet def "Function" @@ -28,3 +28,15 @@ def ${1:function name}(${2:parameters}): """${3:Function description}""" $0 endsnippet + +snippet ae "Assert equals" +self.assertEqual($1, $2) +endsnippet + +snippet at "Assert true" +self.assertTrue(${1:condition}) +endsnippet + +snippet af "Assert false" +self.assertFalse(${1:condition}) +endsnippet