Skip to content

Commit

Permalink
Add and xfail unhandled case dateutil#1029
Browse files Browse the repository at this point in the history
  • Loading branch information
ffe4 committed Jun 17, 2020
1 parent 0905e27 commit 8f2fdab
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions dateutil/test/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 8f2fdab

Please sign in to comment.