| 495 | tzinfo=self.brsttz)) |
| 496 | |
| 497 | def testFuzzyWithTokens(self): |
| 498 | s1 = "Today is 25 of September of 2003, exactly " \ |
| 499 | "at 10:49:41 with timezone -03:00." |
| 500 | self.assertEqual(parse(s1, fuzzy_with_tokens=True), |
| 501 | (datetime(2003, 9, 25, 10, 49, 41, |
| 502 | tzinfo=self.brsttz), |
| 503 | ('Today is ', 'of ', ', exactly at ', |
| 504 | ' with timezone ', '.'))) |
| 505 | |
| 506 | s2 = "http://biz.yahoo.com/ipo/p/600221.html" |
| 507 | self.assertEqual(parse(s2, fuzzy_with_tokens=True), |
| 508 | (datetime(2060, 2, 21, 0, 0, 0), |
| 509 | ('http://biz.yahoo.com/ipo/p/', '.html'))) |
| 510 | |
| 511 | def testFuzzyAMPMProblem(self): |
| 512 | # Sometimes fuzzy parsing results in AM/PM flag being set without |