Exemple #1
0
 def test_normal(self):
     self.assertEquals(self.LAST, __unit__.last(self.NORMAL_LIST))
Exemple #2
0
 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_))
Exemple #3
0
 def test_empty(self):
     with self.assertRaises(IndexError):
         __unit__.last([])
Exemple #4
0
 def test_singleton(self):
     self.assertEquals(self.LAST, __unit__.last(self.SINGLETON_LIST))
Exemple #5
0
 def test_none(self):
     with self.assertRaises(TypeError):
         __unit__.last(None)
Exemple #6
0
 def test_some_object(self):
     with self.assertRaises(TypeError):
         __unit__.last(object())
Exemple #7
0
 def test_normal(self):
     self.assertEquals(self.LAST, __unit__.last(self.NORMAL_LIST))
Exemple #8
0
 def test_singleton(self):
     self.assertEquals(self.LAST, __unit__.last(self.SINGLETON_LIST))
Exemple #9
0
 def test_empty(self):
     with self.assertRaises(IndexError):
         __unit__.last([])
Exemple #10
0
 def test_some_object(self):
     with self.assertRaises(TypeError):
         __unit__.last(object())
Exemple #11
0
 def test_none(self):
     with self.assertRaises(TypeError):
         __unit__.last(None)