Exemplo n.º 1
0
 def test_number_sequence_from_0_to_10_closed(self):
     self.assertTrue(sources.rangeClosed().any_matches(lambda k: k % 2 == 0))
Exemplo n.º 2
0
 def test_number_sequence_from_0_to_10_closed(self):
     self.assertEqual(sources.rangeClosed().max(), 10)
Exemplo n.º 3
0
 def test_number_sequence_from_0_to_10_closed(self):
     self.assertTupleEqual(sources.rangeClosed().statistics(), NumberStatistics(55, 11, 0, 10, 5))
Exemplo n.º 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])
Exemplo n.º 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')
Exemplo n.º 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))
Exemplo n.º 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])