Add discover.py and change test code to support Python 3.1.
Change syntax to support Python 2.7.
Change syntax and add unittest compatibility code to support Python 2.6.
Change assertRaises format to be consistent with other cases.