Initial commit, simple python scaffold

This commit is contained in:
Honza Kral
2013-05-01 16:39:30 +02:00
commit 20fbba1230
12 changed files with 107 additions and 0 deletions
View File
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env python
import sys
from os import path
import nose
def run_all(argv=None):
sys.exitfunc = lambda: sys.stderr.write('Shutting down....\n')
# always insert coverage when running tests
if argv is None:
argv = [
'nosetests',
'--with-coverage', '--cover-package=elasticsearch', '--cover-erase',
'--nocapture', '--nologcapture',
'--verbose', '--no-skip'
]
else:
for p in ('--with-coverage', '--cover-package=elasticsearch', '--cover-erase'):
if p not in argv:
argv.append(p)
nose.run_exit(
argv=argv,
defaultTest=path.abspath(path.dirname(__file__))
)
if __name__ == '__main__':
run_all(sys.argv)
+5
View File
@@ -0,0 +1,5 @@
from nose import tools
def test_passing():
tools.assert_equals(1+1, 2)