예제 #1
0
파일: test_lists.py 프로젝트: Xion/taipan
 def test_normal(self):
     self.assertEquals(self.LAST, __unit__.last(self.NORMAL_LIST))
예제 #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_))
예제 #3
0
파일: test_lists.py 프로젝트: Xion/taipan
 def test_empty(self):
     with self.assertRaises(IndexError):
         __unit__.last([])
예제 #4
0
파일: test_lists.py 프로젝트: Xion/taipan
 def test_singleton(self):
     self.assertEquals(self.LAST, __unit__.last(self.SINGLETON_LIST))
예제 #5
0
파일: test_lists.py 프로젝트: Xion/taipan
 def test_none(self):
     with self.assertRaises(TypeError):
         __unit__.last(None)
예제 #6
0
파일: test_lists.py 프로젝트: Xion/taipan
 def test_some_object(self):
     with self.assertRaises(TypeError):
         __unit__.last(object())
예제 #7
0
 def test_normal(self):
     self.assertEquals(self.LAST, __unit__.last(self.NORMAL_LIST))
예제 #8
0
 def test_singleton(self):
     self.assertEquals(self.LAST, __unit__.last(self.SINGLETON_LIST))
예제 #9
0
 def test_empty(self):
     with self.assertRaises(IndexError):
         __unit__.last([])
예제 #10
0
 def test_some_object(self):
     with self.assertRaises(TypeError):
         __unit__.last(object())
예제 #11
0
 def test_none(self):
     with self.assertRaises(TypeError):
         __unit__.last(None)