tests/templatetestdir/test.py
Go to the documentation of this file.00001
00002
00003 import unittest
00004
00005 import SyFi
00006 import sfc
00007
00008
00009 class MyTest(unittest.TestCase):
00010 def setUp(self):
00011
00012
00013
00014 print "Running templatetest in testdir"
00015 print "Imported SyFi from location", SyFi.__file__
00016 print "Imported sfc from location", sfc.__file__
00017
00018 self.foo = 1
00019
00020 def tearDown(self):
00021
00022
00023 del self.foo
00024
00025 def testSetup(self):
00026
00027
00028 assert self.foo
00029
00030 def testMyStuff(self):
00031
00032
00033 assert 1
00034
00035 def testFailureExample(self):
00036 assert 1
00037
00038
00039
00040 def test(verbosity=0):
00041 classes = [MyTest]
00042 suites = [unittest.makeSuite(c) for c in classes]
00043 testsuites = unittest.TestSuite(suites)
00044 unittest.TextTestRunner(verbosity=verbosity).run(testsuites)
00045
00046 if __name__ == "__main__":
00047 test()
00048