| 507 | tzinfo=self.brsttz)) |
| 508 | |
| 509 | def testFuzzyWithTokens(self): |
| 510 | s1 = "Today is 25 of September of 2003, exactly " \ |
| 511 | "at 10:49:41 with timezone -03:00." |
| 512 | self.assertEqual(parse(s1, fuzzy_with_tokens=True), |
| 513 | (datetime(2003, 9, 25, 10, 49, 41, |
| 514 | tzinfo=self.brsttz), |
| 515 | ('Today is ', 'of ', ', exactly at ', |
| 516 | ' with timezone ', '.'))) |
| 517 | |
| 518 | s2 = "http://biz.yahoo.com/ipo/p/600221.html" |
| 519 | self.assertEqual(parse(s2, fuzzy_with_tokens=True), |
| 520 | (datetime(2060, 2, 21, 0, 0, 0), |
| 521 | ('http://biz.yahoo.com/ipo/p/', '.html'))) |
| 522 | |
| 523 | def testFuzzyAMPMProblem(self): |
| 524 | # Sometimes fuzzy parsing results in AM/PM flag being set without |