示例#1
0
 def test_number_sequence_from_0_to_10_closed(self):
     self.assertTrue(sources.rangeClosed().any_matches(lambda k: k % 2 == 0))
示例#2
0
文件: test_max.py 项目: Degubi/Py-Seq
 def test_number_sequence_from_0_to_10_closed(self):
     self.assertEqual(sources.rangeClosed().max(), 10)
示例#3
0
 def test_number_sequence_from_0_to_10_closed(self):
     self.assertTupleEqual(sources.rangeClosed().statistics(), NumberStatistics(55, 11, 0, 10, 5))
示例#4
0
 def test_number_sequence_from_0_to_10_closed(self):
     self.assertListEqual(sources.rangeClosed().to_list(),
                          [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
示例#5
0
 def test_number_sequence_from_0_to_10_closed(self):
     self.assertEqual(sources.rangeClosed().join(', '),
                      '0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10')
示例#6
0
 def test_number_sequence_from_0_to_10_closed_with_not_handling_duplicates(
         self):
     self.assertRaises(
         Exception, lambda: sources.rangeClosed().to_dictionary(
             lambda k: k % 2, lambda k: k))
示例#7
0
 def test_number_sequence_from_0_to_10_closed(self):
     self.assertListEqual(forEachOpHelper(sources.rangeClosed()),
                          [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])