def test_normal(self): self.assertEquals(self.LAST, __unit__.last(self.NORMAL_LIST))
def test_class__deep_hierarchy(self): chain = self._create_inheritance_chain(8) superclasses, class_ = init(chain), last(chain) self.assertItemsEqual( [object] + superclasses, __unit__.iter_superclasses(class_))
def test_empty(self): with self.assertRaises(IndexError): __unit__.last([])
def test_singleton(self): self.assertEquals(self.LAST, __unit__.last(self.SINGLETON_LIST))
def test_none(self): with self.assertRaises(TypeError): __unit__.last(None)
def test_some_object(self): with self.assertRaises(TypeError): __unit__.last(object())