Exemplo n.º 1
0
 def test_normalize_key_exception(self):
     a = VDFDict()
     with self.assertRaises(TypeError):
         a._normalize_key(5)
     with self.assertRaises(TypeError):
         a._normalize_key([])
     with self.assertRaises(TypeError):
         a._normalize_key(None)
Exemplo n.º 2
0
 def test_normalize_key_exception(self):
     a = VDFDict()
     with self.assertRaises(TypeError):
         a._normalize_key(5)
     with self.assertRaises(TypeError):
         a._normalize_key([])
     with self.assertRaises(TypeError):
         a._normalize_key(None)
Exemplo n.º 3
0
 def test_normalize_key(self):
     a = VDFDict()
     self.assertEqual(a._normalize_key('AAA'), (0, 'AAA'))
     self.assertEqual(a._normalize_key((5, 'BBB')), (5, 'BBB'))
Exemplo n.º 4
0
 def test_normalize_key(self):
     a = VDFDict()
     self.assertEqual(a._normalize_key('AAA'), (0, 'AAA'))
     self.assertEqual(a._normalize_key((5, 'BBB')), (5, 'BBB'))