Skip to content

Commit

Permalink
Add and xfail unhandled case #1029
Browse files Browse the repository at this point in the history
  • Loading branch information
ffe4 committed Jun 18, 2020
1 parent 43b7838 commit 6c6ef34
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_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):
Expand Down

0 comments on commit 6c6ef34

Please sign in to comment.