Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add and xfail unhandled case #1029 #1056

Merged
merged 1 commit into from
Jul 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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