On Fri, 15 Apr 2016 12:08 am, Antoon Pardon wrote:

> 
> I have a unittest for my avltree module.
> 
> Now I want this unittest to also run on a subclass of avltree.
> How can I organise this, so that I can largely reuse the
> original TestCase?


class Test_AVLTree(unittest.TestCase):
    tree = avltree

    def test_empty_tree_is_false(self):
        instance = self.tree()
        self.assertFalse(instance)


class Test_MySubclassTree(Test_AVLTree):
    tree = My_Subclass_Tree



-- 
Steven

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to