summaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
authorTomi Pieviläinen <hukka@tsume>2013-10-31 15:54:55 +0200
committerTomi Pieviläinen <hukka@tsume>2013-10-31 15:54:55 +0200
commita293ed674f3da906317f4c7b5d032d0d0a80dec5 (patch)
tree4d0931568cb3a9c8c7948bdeca02d027993bf120 /test.py
parent6a2fbff609cc718539440ff9c54797e7bbcf3db3 (diff)
parent1c491217bff7dc2c55d9ec9a0bcd2c9402119b8d (diff)
downloaddateutil-a293ed674f3da906317f4c7b5d032d0d0a80dec5.tar.gz
Merge Christopher Corley's changes
Diffstat (limited to 'test.py')
-rwxr-xr-xtest.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/test.py b/test.py
index 67846a1..394992c 100755
--- a/test.py
+++ b/test.py
@@ -3458,6 +3458,16 @@ class ParserTest(unittest.TestCase):
self.assertEqual(parse(s, fuzzy=True),
datetime(2003, 9, 25, 10, 49, 41,
tzinfo=self.brsttz))
+ def testFuzzyWithTokens(self):
+ s = "Today is 25 of September of 2003, exactly " \
+ "at 10:49:41 with timezone -03:00."
+ self.assertEqual(parse(s, fuzzy_with_tokens=True),
+ (datetime(2003, 9, 25, 10, 49, 41,
+ tzinfo=self.brsttz),
+ ('Today is ', 'of ', ', exactly at ',
+ ' with timezone ', '.')
+ )
+ )
def testExtraSpace(self):
self.assertEqual(parse(" July 4 , 1976 12:01:02 am "),