예제 #1
0
 def test_map(self):
     self.assertDictEqual(
         sources.map().to_dictionary(lambda k: k, lambda k: k % 4), {
             0: 0,
             4: 0,
             8: 0
         })
예제 #2
0
파일: test_max.py 프로젝트: Degubi/Py-Seq
 def test_map(self):
     self.assertEqual(sources.map().max(), 8)
예제 #3
0
 def test_map(self):
     self.assertEqual(sources.map().first(), 0)
예제 #4
0
 def test_map(self):
     self.assertTrue(sources.map().any_matches(lambda k: k % 4 == 0))
예제 #5
0
 def test_map(self):
     self.assertEqual(sources.map().average(), 4)
예제 #6
0
 def test_map(self):
     self.assertTupleEqual(sources.map().statistics(), NumberStatistics(12, 3, 0, 8, 4))
예제 #7
0
 def test_map(self):
     self.assertListEqual(sources.map().to_list(), [0, 4, 8])
예제 #8
0
파일: test_join.py 프로젝트: Degubi/Py-Seq
 def test_map(self):
     self.assertEqual(sources.map().join('x'), '0x4x8')
예제 #9
0
파일: test_sum.py 프로젝트: Degubi/Py-Seq
 def test_map(self):
     self.assertEqual(sources.map().sum(), 12)
예제 #10
0
 def test_map(self):
     self.assertListEqual(forEachOpHelper(sources.map()), [0, 4, 8])
예제 #11
0
 def test_map(self):
     self.assertEqual(sources.map().count(), 3)