class AlgoMixin(object):

    def test_empty(self):
        result = self.function(make_empty_graph())
self.assertTrue(result)


class TestF(AlgoMixin, unittest.TestCase):
    function = staticmethod(f)

def test_random(self):
    pass
How to factorise python test cases with nosetests