def test_lineage_name(self): f = lambda x: x self.assertEqual(f.__name__, name(f)) f = "test" self.assertEqual("test", name(f))