Skip to content

Commit

Permalink
tests: Fix typo in test_isotime_raises
Browse files Browse the repository at this point in the history
The test was meant to validate `parse_isodate` but was using
`parse_isotime` instead. Move the test case to the list validating
invalid formats.
  • Loading branch information
mariocj89 committed May 17, 2021
1 parent e7f1776 commit 09dbcd7
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions dateutil/test/test_isoparser.py
Expand Up @@ -388,6 +388,7 @@ def test_parse_isodate(d, dt_fmt, as_bytes):
('2013-02-29', ValueError), # Not a leap year
('2014/12/03', ValueError), # Wrong separators
('2014-04-19T', ValueError), # Unknown components
('201202', ValueError), # Invalid format
])
def test_isodate_raises(isostr, exception):
with pytest.raises(exception):
Expand Down Expand Up @@ -494,13 +495,3 @@ def test_isotime_raises(isostr, exception):
iparser = isoparser()
with pytest.raises(exception):
iparser.parse_isotime(isostr)


@pytest.mark.xfail()
@pytest.mark.parametrize('isostr,exception', [ # pragma: nocover
('201202', ValueError) # Invalid ISO format
])
def test_isotime_raises_xfail(isostr, exception):
iparser = isoparser()
with pytest.raises(exception):
iparser.parse_isotime(isostr)

0 comments on commit 09dbcd7

Please sign in to comment.