Пример #1
0
 def test_take(self):
     self.assertEqual(sources.take().max(), 10)
Пример #2
0
 def test_take(self):
     self.assertTrue(sources.take().any_matches(lambda k: k * 0 == 0))
Пример #3
0
 def test_take(self):
     self.assertEqual(sources.take().first(), 0)
Пример #4
0
 def test_take(self):
     self.assertTupleEqual(sources.take().statistics(), NumberStatistics(30, 6, 0, 10, 5))
Пример #5
0
 def test_take(self):
     self.assertEqual(sources.take().average(), 5)
Пример #6
0
 def test_take(self):
     self.assertEqual(sources.take().join(' '), '0 2 4 6 8 10')
Пример #7
0
 def test_take(self):
     self.assertListEqual(sources.take().to_list(), [0, 2, 4, 6, 8, 10])
Пример #8
0
 def test_take(self):
     self.assertEqual(sources.take().sum(), 30)
Пример #9
0
 def test_take(self):
     self.assertListEqual(sources.take().chunk(5).to_list(),
                          [[0, 2, 4, 6, 8], [10]])
Пример #10
0
 def test_take(self):
     self.assertRaises(
         Exception,
         lambda: sources.take().to_dictionary(lambda _: 1, lambda _: 2))
Пример #11
0
 def test_take(self):
     self.assertListEqual(forEachOpHelper(sources.take()),
                          [0, 2, 4, 6, 8, 10])
Пример #12
0
 def test_take(self):
     self.assertEqual(sources.take().count(), 6)