示例#1
0
 def test_map(self):
     self.assertEquals(self.MAPPED_DICT,
                       __unit__.mapitems(MapItems.FUNCTION, self.DICT))
示例#2
0
 def test_dict__some_object(self):
     with self.assertRaises(TypeError):
         __unit__.mapitems(MapItems.FUNCTION, object())
示例#3
0
 def test_dict__empty(self):
     self.assertEquals({}, __unit__.mapitems(None, {}))
     self.assertEquals({}, __unit__.mapitems(MapItems.FUNCTION, {}))
示例#4
0
 def test_function__non_function(self):
     with self.assertRaises(TypeError):
         __unit__.mapitems(object(), self.DICT)
示例#5
0
 def test_dict__none(self):
     with self.assertRaises(TypeError):
         __unit__.mapitems(MapItems.FUNCTION, None)
示例#6
0
文件: test_dicts.py 项目: Xion/taipan
 def test_map(self):
     self.assertEquals(self.MAPPED_DICT,
                       __unit__.mapitems(MapItems.FUNCTION, self.DICT))
示例#7
0
 def test_function__none(self):
     self.assertEquals(self.DICT, __unit__.mapitems(None, self.DICT))
示例#8
0
文件: test_dicts.py 项目: Xion/taipan
 def test_dict__empty(self):
     self.assertEquals({}, __unit__.mapitems(None, {}))
     self.assertEquals({}, __unit__.mapitems(MapItems.FUNCTION, {}))
示例#9
0
文件: test_dicts.py 项目: Xion/taipan
 def test_dict__some_object(self):
     with self.assertRaises(TypeError):
         __unit__.mapitems(MapItems.FUNCTION, object())
示例#10
0
文件: test_dicts.py 项目: Xion/taipan
 def test_dict__none(self):
     with self.assertRaises(TypeError):
         __unit__.mapitems(MapItems.FUNCTION, None)
示例#11
0
文件: test_dicts.py 项目: Xion/taipan
 def test_function__non_function(self):
     with self.assertRaises(TypeError):
         __unit__.mapitems(object(), self.DICT)
示例#12
0
文件: test_dicts.py 项目: Xion/taipan
 def test_function__none(self):
     self.assertEquals(self.DICT, __unit__.mapitems(None, self.DICT))