'make sure that the base class\'s hook is called reliably'

def testBaseHook(self):

    base = BaseClass()
    self.assertEqual(base.calledBase, 0)
    self.assertEqual(base.calledBasePre, 0)
    base.func(1, 2)
    self.assertEqual(base.calledBase, 1)
    self.assertEqual(base.calledBasePre, 0)
    hook.addPre(BaseClass, 'func', basePre)
    base.func(1, b=2)
    self.assertEqual(base.calledBase, 2)
    self.assertEqual(base.calledBasePre, 1)
    hook.addPost(BaseClass, 'func', basePost)
    base.func(1, b=2)
    self.assertEqual(base.calledBasePost, 1)
    self.assertEqual(base.calledBase, 3)
    self.assertEqual(base.calledBasePre, 2)
    hook.removePre(BaseClass, 'func', basePre)
    hook.removePost(BaseClass, 'func', basePost)
    base.func(1, b=2)
    self.assertEqual(base.calledBasePost, 1)
    self.assertEqual(base.calledBase, 4)
    self.assertEqual(base.calledBasePre, 2)
