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

Method testStrStr

tests/test_tz.py:1427–1433  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1425 return tz.tzstr(tzname_map[tzname])
1426
1427 def testStrStr(self):
1428 # Test that tz.tzstr() won't throw an error if given a str instead
1429 # of a unicode literal.
1430 self.assertEqual(datetime(2003, 4, 6, 1, 59,
1431 tzinfo=tz.tzstr(str("EST5EDT"))).tzname(), "EST")
1432 self.assertEqual(datetime(2003, 4, 6, 2, 00,
1433 tzinfo=tz.tzstr(str("EST5EDT"))).tzname(), "EDT")
1434
1435 def testStrInequality(self):
1436 TZS1 = tz.tzstr('EST5EDT4')

Callers

nothing calls this directly

Calls 1

tznameMethod · 0.45

Tested by

no test coverage detected