From 8f2fdab0f6c5980b8d05ecf642effec886647b6c Mon Sep 17 00:00:00 2001 From: Daniel Lemm <61800298+ffe4@users.noreply.github.com> Date: Wed, 17 Jun 2020 17:51:31 +0200 Subject: [PATCH] Add and xfail unhandled case #1029 --- dateutil/test/test_parser.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dateutil/test/test_parser.py b/dateutil/test/test_parser.py index cfa4bbbcc..09d094055 100644 --- a/dateutil/test/test_parser.py +++ b/dateutil/test/test_parser.py @@ -875,6 +875,15 @@ def test_unambiguous_YYYYMM(self): expected = datetime(2017, 12, 1) assert res == expected + @pytest.mark.xfail + def test_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_with_tokens=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):