コード例 #1
0
 def test(self):
     """Dictionary test method"""
     s = Dictionary()
     s[1] = "one"
     s[2] = "two"
     s[3] = "three"
     s[4] = "four"
     s[5] = "five"
     self.assertEqual(s.__keys__(), [1, 2, 3, 4, 5])
コード例 #2
0
 def test(self):
     """Dictionary test method"""
     s = Dictionary()
     for i in range(41):
         s[i] = str(i)
     self.assertEqual(s.__keys__(), [
         0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
         19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
         36, 37, 38, 39, 40
     ])
コード例 #3
0
 def test(self):
     """Dictionary test method"""
     s = Dictionary()
     self.assertEqual(s.__keys__(), [])