Skip to content

Commit

Permalink
add assertions for res.tzinfo is expected.tzinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrockmendel authored and pganssle committed Mar 19, 2019
1 parent da8fdf8 commit 192d14a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dateutil/test/test_parser.py
Expand Up @@ -373,6 +373,7 @@ def test_valid_tzinfo_tzinfo_input(self):
expected = datetime(2014, 1, 19, 9, tzinfo=tz.UTC)
res = parse(dstr, tzinfos=tzinfos)
assert res == expected
assert res.tzinfo is expected.tzinfo

def test_valid_tzinfo_unicode_input(self):
dstr = "2014 January 19 09:00 UTC"
Expand All @@ -390,6 +391,7 @@ def tzinfos(*args, **kwargs):
expected = datetime(2014, 1, 19, 9, tzinfo=tz.tzstr("UTC+0"))
res = parse(dstr, tzinfos=tzinfos)
assert res == expected
assert res.tzinfo is expected.tzinfo

@pytest.mark.xfail(reason="Doesn't check for UTC in tzinfos dict, "
"not sure it *should*.")
Expand All @@ -399,6 +401,7 @@ def test_valid_tzinfo_int_input(self):
expected = datetime(2014, 1, 19, 9, tzinfo=tz.UTC)
res = parse(dstr, tzinfos=tzinfos)
assert res == expected
assert res.tzinfo is expected.tzinfo


class ParserTest(unittest.TestCase):
Expand Down

0 comments on commit 192d14a

Please sign in to comment.