Пример #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
 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])