示例#1
0
    def test_multiple_year(self):
        year = '2011-12'
        parsed_year = parse_year(year)
        self.assertEqual((2011, 2012), parsed_year)

        year = '2011-2012'
        parsed_year = parse_year(year)
        self.assertEqual((2011, 2012), parsed_year)

        year = 'c.1950-53'
        parsed_year = parse_year(year)
        self.assertEqual((1950, 1953), parsed_year)
示例#2
0
 def test_nd(self):
     year = 'nd'
     parsed_year = parse_year(year)
     self.assertEqual((1, 1), parsed_year)
示例#3
0
 def test_circa(self):
     year = 'c.1953'
     parsed_year = parse_year(year)
     self.assertEqual((1953, 1953), parsed_year)
示例#4
0
 def test_single_year(self):
     year = '1956'
     parsed_year = parse_year(year)
     self.assertEqual((1956, 1956), parsed_year)