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)
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_female_correct_type(self): for item in t.extract_general_female(self._stat): self._check_type(item)
def test_extract_female_correct_order(self): self.assertHasOrder( t.extract_general_female(self._stat), func=self._cmp)
def testExtractFemale_CorrectType(self): for item in t.extract_general_female(self._stat): self._check_type(item)
def testExtractFemale_CorrectOrder(self): self.assertHasOrder(t.extract_general_female(self._stat), func=self._cmp)