python Programming Glossary: basetest
Python unit test with base and sub class http://stackoverflow.com/questions/1323455/python-unit-test-with-base-and-sub-class set of tests. Here's an example import unittest class BaseTest unittest.TestCase def testCommon self print 'Calling BaseTest.. unittest.TestCase def testCommon self print 'Calling BaseTest testCommon' value 5 self.assertEquals value 5 class SubTest1.. value 5 self.assertEquals value 5 class SubTest1 BaseTest def testSub1 self print 'Calling SubTest1 testSub1' sub 3 self.assertEquals..
|