示例#1
0
 def testWrongValueType(self):
     with self.assertRaises(TypeError):
         utils.AssertDictType({
             "foo": 1,
             "bar": 2,
             "baz": 3.14
         }, unicode, int)
示例#2
0
 def testNotADictIncorrect(self):
   with self.assertRaises(TypeError):
     utils.AssertDictType([(1, "foo"), (2, "bar"), (3, "baz")], int, unicode)
示例#3
0
 def testIntStringDictCorrect(self):
   del self  # Unused.
   utils.AssertDictType({1: "foo", 2: "bar", 3: "baz"}, int, unicode)