annotate makeitso/python_package/tests/unit.py @ 147:bdf4049e83ea

add a unit test skeleton
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 05 Mar 2012 15:08:24 -0800
parents
children e3ba71e7b927
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
bdf4049e83ea add a unit test skeleton
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
14 class {{Package}}UnitTest(unittest.TestCase):
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()