示例#1
0
 def test_number_list(self):
     """Test na liście liczb."""
     self.assertEqual(freq_dic([1, 1, 2, 1, 10, 20, 2]), {
         1: 3,
         2: 2,
         10: 1,
         20: 1
     })
示例#2
0
 def test_string(self):
     """Test na napisie."""
     self.assertEqual(freq_dic("abracadabra"), {
         "a": 5,
         "b": 2,
         "c": 1,
         "d": 1,
         "r": 2
     })
示例#3
0
文件: Task102Test.py 项目: kaczla/PJN
 def test_empty(self):
     """Test na pustej liście."""
     self.assertEqual(freq_dic([]), { })
示例#4
0
文件: Task102Test.py 项目: kaczla/PJN
 def test_tuple(self):
     """Test na krotce."""
     self.assertEqual(freq_dic((1, 2, 3, 1)), {1: 2, 2: 1, 3: 1})
示例#5
0
文件: Task102Test.py 项目: kaczla/PJN
 def test_number_list(self):
     """Test na liście liczb."""
     self.assertEqual(freq_dic([1, 1, 2, 1, 10, 20, 2]), {1: 3, 2: 2, 10: 1, 20: 1})
示例#6
0
文件: Task102Test.py 项目: kaczla/PJN
 def test_string(self):
     """Test na napisie."""
     self.assertEqual(freq_dic("abracadabra"), {"a": 5, "b": 2, "c": 1, "d": 1, "r": 2})
示例#7
0
 def test_empty(self):
     """Test na pustej liście."""
     self.assertEqual(freq_dic([]), {})
示例#8
0
 def test_tuple(self):
     """Test na krotce."""
     self.assertEqual(freq_dic((1, 2, 3, 1)), {1: 2, 2: 1, 3: 1})