コード例 #1
0
ファイル: test_lists.py プロジェクト: Xion/taipan
 def test_normal(self):
     self.assertEquals(self.LAST, __unit__.last(self.NORMAL_LIST))
コード例 #2
0
ファイル: test_classes.py プロジェクト: movermeyer/taipan
 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)