summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Lemm <61800298+ffe4@users.noreply.github.com>2020-06-17 17:51:31 +0200
committerDaniel Lemm <61800298+ffe4@users.noreply.github.com>2020-06-18 13:50:08 +0200
commit6c6ef342b4a4c955f439311bff40b05dce8dfe80 (patch)
treecf0bed21fbb90be5269dfd7b9d129e8c86ac46e7
parent43b7838af5d801575e26516e34355eb1ca57beec (diff)
downloaddateutil-git-6c6ef342b4a4c955f439311bff40b05dce8dfe80.tar.gz
Add and xfail unhandled case #1029
-rw-r--r--dateutil/test/test_parser.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/dateutil/test/test_parser.py b/dateutil/test/test_parser.py
index cfa4bbb..5f6d73f 100644
--- a/dateutil/test/test_parser.py
+++ b/dateutil/test/test_parser.py
@@ -875,6 +875,15 @@ class TestParseUnimplementedCases(object):
expected = datetime(2017, 12, 1)
assert res == expected
+ @pytest.mark.xfail
+ def test_extraneous_numerical_content(self):
+ # ref: https://github.com/dateutil/dateutil/issues/1029
+ # parser interprets price and percentage as parts of the date
+ dstr = "£14.99 (25% off, until April 20)"
+ res = parse(dstr, fuzzy=True, default=datetime(2000, 1, 1))
+ expected = datetime(2000, 4, 20)
+ assert res == expected
+
@pytest.mark.skipif(IS_WIN, reason="Windows does not use TZ var")
class TestTZVar(object):