diff options
author | Mario Corchero <mcorcherojim@bloomberg.net> | 2021-05-17 08:44:10 +0200 |
---|---|---|
committer | Mario Corchero <mcorcherojim@bloomberg.net> | 2021-05-19 21:00:32 +0200 |
commit | aa62cdc0e76e014afacf0d8cec034f80d0b1d47d (patch) | |
tree | c0c2eac0d50f2e403ed175c5a0b25a3f143a7790 | |
parent | 34906dcd4112197c8f6386f799c10b8a34cb248f (diff) | |
download | dateutil-git-aa62cdc0e76e014afacf0d8cec034f80d0b1d47d.tar.gz |
tests: Fix typo in `test_isotime_raises`
The test was meant to validate `parse_isodate` but was using
`parse_isotime` instead. Move the test case to the list validating
invalid formats.
-rw-r--r-- | dateutil/test/test_isoparser.py | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/dateutil/test/test_isoparser.py b/dateutil/test/test_isoparser.py index 0c91db7..a9420bb 100644 --- a/dateutil/test/test_isoparser.py +++ b/dateutil/test/test_isoparser.py @@ -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): @@ -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) |