MCPcopy Create free account
hub / github.com/dateutil/dateutil / test_invalid_tzstr

Function test_invalid_tzstr

tests/test_tzfile.py:2237–2242  ·  view source on GitHub ↗

Malformed TZ strings raise ValueError naming the string.

(tzstr)

Source from the content-addressed store, hash-verified

2235
2236@pytest.mark.parametrize("tzstr", INVALID_TZSTRS)
2237def test_invalid_tzstr(tzstr):
2238 """Malformed TZ strings raise ValueError naming the string."""
2239 import re
2240
2241 with pytest.raises(ValueError, match=re.escape(tzstr)):
2242 zone_from_tzstr(tzstr)
2243
2244
2245@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 1

zone_from_tzstrFunction · 0.85

Tested by

no test coverage detected