Exemple #1
0
    def testYearEqualsMalePlusFemale(self):
        for year in t.extract_years(self._stat):
            alls = t.extract_year(self._stat, year)
            males = t.extract_year_male(self._stat, year)
            females = t.extract_year_female(self._stat, year)

            self.assertEqual(len(alls), len(males) + len(females))
            self.assertSubSequence(males, alls)
            self.assertSubSequence(females, alls)
Exemple #2
0
 def testExtractYearFemale_CorrectOrder(self):
     for year in t.extract_years(self._stat):
         self.assertHasOrder(t.extract_year_female(self._stat, year),
                             func=self._cmp)
Exemple #3
0
 def testExtractYearFemale_CorrectType(self):
     for year in t.extract_years(self._stat):
         for item in t.extract_year_female(self._stat, year):
             self._check_type(item)
Exemple #4
0
 def testExtractYears(self):
     self.assertListEqual(t.extract_years(self._stat),
                          list(map(str, range(2004, 2013))))