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

Method testFilestreamWithNameRepr

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

Source from the content-addressed store, hash-verified

2123 tz.tzfile(BytesIO(b'BadFile'))
2124
2125 def testFilestreamWithNameRepr(self):
2126 # If fileobj is a filestream with a "name" attribute this name should
2127 # be reflected in the tz object's repr
2128 fileobj = BytesIO(base64.b64decode(TZFILE_EST5EDT))
2129 fileobj.name = 'foo'
2130 tzc = tz.tzfile(fileobj)
2131 self.assertEqual(repr(tzc), 'tzfile(' + repr('foo') + ')')
2132
2133 def testLeapCountDecodesProperly(self):
2134 # This timezone has leapcnt, and failed to decode until

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected