Mercurial > hg > MakeItSo
annotate makeitso/python_package/tests/test_{{package}}.py @ 266:402b17ba3d19
version bump
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Fri, 01 Sep 2017 09:40:59 -0700 |
parents | ee752ac566f1 |
children |
rev | line source |
---|---|
147 | 1 #!/usr/bin/env python |
208 | 2 # -*- coding: utf-8 -*- |
147 | 3 |
4 """ | |
209 | 5 unit tests for {{package}} |
147 | 6 """ |
7 | |
8 import os | |
9 import sys | |
202
2d009a183d53
STUB: makeitso/python_package/tests/test_{{package}}.py
Jeff Hammel <k0scist@gmail.com>
parents:
193
diff
changeset
|
10 import tempfile |
147 | 11 import unittest |
12 | |
13 # globals | |
14 here = os.path.dirname(os.path.abspath(__file__)) | |
15 | |
148 | 16 class {{package}}UnitTest(unittest.TestCase): |
147 | 17 |
18 def test_{{package}}(self): | |
203
84be91d59996
STUB: makeitso/python_package/tests/test_{{package}}.py
Jeff Hammel <k0scist@gmail.com>
parents:
202
diff
changeset
|
19 tf = tempfile.mktemp() |
84be91d59996
STUB: makeitso/python_package/tests/test_{{package}}.py
Jeff Hammel <k0scist@gmail.com>
parents:
202
diff
changeset
|
20 try: |
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 pass |
84be91d59996
STUB: makeitso/python_package/tests/test_{{package}}.py
Jeff Hammel <k0scist@gmail.com>
parents:
202
diff
changeset
|
23 finally: |
84be91d59996
STUB: makeitso/python_package/tests/test_{{package}}.py
Jeff Hammel <k0scist@gmail.com>
parents:
202
diff
changeset
|
24 if os.path.exists(tf): |
84be91d59996
STUB: makeitso/python_package/tests/test_{{package}}.py
Jeff Hammel <k0scist@gmail.com>
parents:
202
diff
changeset
|
25 os.remove(tf) |
147 | 26 |
27 if __name__ == '__main__': | |
28 unittest.main() |