def test_general_equals_male_plus_female(self):
        alls = t.extract_general(self._stat)
        males = t.extract_general_male(self._stat)
        females = t.extract_general_female(self._stat)

        self.assertEqual(len(alls), len(males) + len(females))
        self.assertSubSequence(males, alls)
        self.assertSubSequence(females, alls)
Beispiel #2
0
    def testCorrectSex(self):
        self.assertSubSequence(
            (('Дмитрий', 36), ('Илья', 19), ('Игорь', 12), ('Роман', 8),
             ('Кирилл', 7), ('Никита', 5), ('Лёва', 1), ('Алехандро', 1)),
            t.extract_general_male(self._stat))

        self.assertSubSequence((('Елена', 18), ('Ксения', 5), ('Любовь', 2),
                                ('Алёна', 2), ('Елизавета', 1)),
                               t.extract_general_female(self._stat))
 def test_extract_male_correct_type(self):
     for item in t.extract_general_male(self._stat):
         self._check_type(item)
 def test_extract_male_correct_order(self):
     self.assertHasOrder(
         t.extract_general_male(self._stat), func=self._cmp)
Beispiel #5
0
 def testExtractMale_CorrectType(self):
     for item in t.extract_general_male(self._stat):
         self._check_type(item)
Beispiel #6
0
 def testExtractMale_CorrectOrder(self):
     self.assertHasOrder(t.extract_general_male(self._stat), func=self._cmp)