Mercurial > hg > MakeItSo
annotate makeitso/python_package/tests/test_{{package}}.py @ 203:84be91d59996
STUB: makeitso/python_package/tests/test_{{package}}.py
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Tue, 12 Aug 2014 14:53:55 -0700 |
parents | 2d009a183d53 |
children | f7f7831f7c8c |
rev | line source |
---|---|
147 | 1 #!/usr/bin/env python |
2 | |
3 """ | |
4 unit tests | |
5 """ | |
6 | |
7 import os | |
8 import sys | |
202
2d009a183d53
STUB: makeitso/python_package/tests/test_{{package}}.py
Jeff Hammel <k0scist@gmail.com>
parents:
193
diff
changeset
|
9 import tempfile |
147 | 10 import unittest |
11 | |
12 # globals | |
13 here = os.path.dirname(os.path.abspath(__file__)) | |
14 | |
148 | 15 class {{package}}UnitTest(unittest.TestCase): |
147 | 16 |
17 def test_{{package}}(self): | |
203
84be91d59996
STUB: makeitso/python_package/tests/test_{{package}}.py
Jeff Hammel <k0scist@gmail.com>
parents:
202
diff
changeset
|
18 tf = tempfile.mktemp() |
84be91d59996
STUB: makeitso/python_package/tests/test_{{package}}.py
Jeff Hammel <k0scist@gmail.com>
parents:
202
diff
changeset
|
19 try: |
84be91d59996
STUB: makeitso/python_package/tests/test_{{package}}.py
Jeff Hammel <k0scist@gmail.com>
parents:
202
diff
changeset
|
20 # pass |
84be91d59996
STUB: makeitso/python_package/tests/test_{{package}}.py
Jeff Hammel <k0scist@gmail.com>
parents:
202
diff
changeset
|
21 pass |
84be91d59996
STUB: makeitso/python_package/tests/test_{{package}}.py
Jeff Hammel <k0scist@gmail.com>
parents:
202
diff
changeset
|
22 finally: |
84be91d59996
STUB: makeitso/python_package/tests/test_{{package}}.py
Jeff Hammel <k0scist@gmail.com>
parents:
202
diff
changeset
|
23 if os.path.exists(tf): |
84be91d59996
STUB: makeitso/python_package/tests/test_{{package}}.py
Jeff Hammel <k0scist@gmail.com>
parents:
202
diff
changeset
|
24 os.remove(tf) |
147 | 25 |
26 if __name__ == '__main__': | |
27 unittest.main() |