Mercurial > hg > MakeItSo
annotate makeitso/python_package/tests/test_{{package}}.py @ 208:f7f7831f7c8c
add UTF-8 disclaimer
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Tue, 10 Feb 2015 13:19:01 -0800 |
parents | 84be91d59996 |
children | ee752ac566f1 |
rev | line source |
---|---|
147 | 1 #!/usr/bin/env python |
208 | 2 # -*- coding: utf-8 -*- |
147 | 3 |
4 """ | |
208 | 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() |