1
0
mirror of https://github.com/gryf/.vim.git synced 2025-12-17 11:30:29 +01:00
Files
.vim/bundle/snipmate/snippets/pmx.snippets
2012-03-20 14:43:14 +01:00

91 lines
2.0 KiB
Plaintext

snippet edbg
import sys
pydevdPath = r"c:\eclipse\plugins\org.python.pydev.debug_2.0.0.2011040403\pysrc"
if not pydevdPath in sys.path:
sys.path.append(pydevdPath)
import pydevd
pydevd.settrace()
snippet utimport
import pdunittest.common.pmxunittest as pmxunittest
snippet classt
class ${1:Foo}Tests(pmxunittest.TestCase):
"""
Tests for class $1 Tests
"""
def setUp(self):
"""
TODO: Setup test
"""
pass
def tearDown(self):
"""
TODO: Cleanup test
"""
pass
def test_${2:method}(self):
"""
Test $2 method of class $1
"""
${3:pass}
snippet runt
def run():
"""
runs unit tests in "interactive" mode
"""
suite1 = pmxunittest.TestLoader().loadTestsFromTestCase(${1:ClassTests})
suite = pmxunittest.TestSuite([suite1])
ret = pmxunittest.TextTestRunner().run(suite)
return ret
if __name__ == '__main__':
run()
# How to run manually:
#
# C:\> cd L:\runtime\pdpyapp
# C:\> L:
# L:\runtime\pdpyapp> startapp pdunittest\${2:`expand("%:t:r")`}
#
# Use parameters:
# -c (--changes) to check db changes after test run
# -c -r (--report) to gather detailed html report additionally
tested_modules = ['${3:module}'] # modules referenced by the test
automatic_run = ${4:True} # should it be run automatically?
execution_time = 0.000 # estimated time of test ru
snippet deft
def test_${1:fname}(self):
"""
Test for $1
"""
${2:pass}
snippet trace
import traceback
print "", 80*"-"
for _line in traceback.format_stack():
print _line.strip()
snippet pdlog
from PDLOG import PDLOG
PDLOG(${1:31337}, ${2:"msg"})
snippet head
"""
Project: 8202 / EBR
Description: ${2:description}
Created: ${3:00}.${4:2010}, ${5:author}
$RCSfile: ebrfoo.py,v $
$Source: /var/cvs/pmx/pylib/ebrfoo.py,v $
$Date: 2010/10/06 14:24:13 $
$Author: foo $
$Revision: 1.0 $
(c) Copyright ${6:2010} Rockwell Automation,
40-382 Katowice, Poland
"""
vcsid = "$Header: /var/cvs/pmx/pylib/ebrfoo.py,v 1.1 2009/10/06 14:24:13 foo Exp $"
${7}