コード例 #1
0
 def test_parse_year_1(self):
     self.assertEquals(parse("2015"), "Y-2015")
コード例 #2
0
 def test_parse_invalid(self):
     self.assertIsNone(parse("Patrick"))
コード例 #3
0
 def test_parse_quarter_2(self):
     self.assertEquals(parse("2015Q1"), "Q-2015-1")
コード例 #4
0
 def test_parse_quarter_3(self):
     with self.assertRaises(ValidationError):
         self.assertEquals(parse("2015Q5"), "Q-2015-5")
コード例 #5
0
 def test_parse_month_6(self):
     self.assertEquals(parse("2015 January"), "M-2015-01")
コード例 #6
0
 def test_parse_month_5(self):
     self.assertEquals(parse("01/2015"), "M-2015-01")
コード例 #7
0
 def test_parse_month_3(self):
     self.assertEquals(parse("January 2015"), "M-2015-01")
コード例 #8
0
 def test_parse_month_1(self):
     self.assertEquals(parse("jan 2015"), "M-2015-01")
コード例 #9
0
 def test_parse_week_4(self):
     self.assertEquals(parse("2015W3"), "W-2015-03")