예제 #1
0
 def test_distinct_with_objects(self):
     self.assertDictEqual(
         sources.distinctObjects().to_dictionary(lambda k: k,
                                                 lambda k: len(k)), {
                                                     'asd': 3,
                                                     'a': 1,
                                                     'ba': 2
                                                 })
예제 #2
0
파일: test_max.py 프로젝트: Degubi/Py-Seq
 def test_distinct_with_objects(self):
     self.assertEqual(sources.distinctObjects().max(lambda k: len(k)),
                      'asd')
예제 #3
0
 def test_distinct_with_objects(self):
     self.assertEqual(sources.distinctObjects().first(), 'asd')
예제 #4
0
 def test_distinct_with_objects(self):
     self.assertTrue(sources.distinctObjects().any_matches(lambda k: k != 'a'))
예제 #5
0
 def test_distinct_with_objects(self):
     self.assertListEqual(sources.distinctObjects().to_list(),
                          ['asd', 'a', 'ba'])
예제 #6
0
파일: test_join.py 프로젝트: Degubi/Py-Seq
 def test_distinct_with_objects(self):
     self.assertEqual(sources.distinctObjects().join(', '), 'asd, a, ba')
예제 #7
0
 def test_distinct_with_objects(self):
     self.assertListEqual(forEachOpHelper(sources.distinctObjects()),
                          ['asd', 'a', 'ba'])
예제 #8
0
 def test_distinct_with_objects(self):
     self.assertEqual(sources.distinctObjects().last(), 'ba')
예제 #9
0
 def test_distinct_with_objects(self):
     self.assertEqual(sources.distinctObjects().count(), 3)