annotate makeitso/python_package/tests/unit.py @ 156:a7a7c364568a

note on importing; cleanup
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 04 Jul 2013 18:24:13 -0700
parents e3ba71e7b927
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
147
bdf4049e83ea add a unit test skeleton
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
1 #!/usr/bin/env python
bdf4049e83ea add a unit test skeleton
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
2
bdf4049e83ea add a unit test skeleton
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
3 """
bdf4049e83ea add a unit test skeleton
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
4 unit tests
bdf4049e83ea add a unit test skeleton
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
5 """
bdf4049e83ea add a unit test skeleton
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
6
bdf4049e83ea add a unit test skeleton
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
7 import os
bdf4049e83ea add a unit test skeleton
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
8 import sys
bdf4049e83ea add a unit test skeleton
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
9 import unittest
bdf4049e83ea add a unit test skeleton
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
10
bdf4049e83ea add a unit test skeleton
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
11 # globals
bdf4049e83ea add a unit test skeleton
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
12 here = os.path.dirname(os.path.abspath(__file__))
bdf4049e83ea add a unit test skeleton
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
13
148
e3ba71e7b927 correct capitalization
Jeff Hammel <jhammel@mozilla.com>
parents: 147
diff changeset
14 class {{package}}UnitTest(unittest.TestCase):
147
bdf4049e83ea add a unit test skeleton
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
15
bdf4049e83ea add a unit test skeleton
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
16 def test_{{package}}(self):
bdf4049e83ea add a unit test skeleton
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
17 pass
bdf4049e83ea add a unit test skeleton
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
18
bdf4049e83ea add a unit test skeleton
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
19 if __name__ == '__main__':
bdf4049e83ea add a unit test skeleton
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
20 unittest.main()