MCPcopy Index your code
hub / github.com/python/cpython / test_data_header

Method test_data_header

Lib/test/test_urllibnet.py:194–201  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

192
193 @support.requires_resource('walltime')
194 def test_data_header(self):
195 with self.urlretrieve(self.logo) as (file_location, fileheaders):
196 datevalue = fileheaders.get('Date')
197 dateformat = '%a, %d %b %Y %H:%M:%S GMT'
198 try:
199 time.strptime(datevalue, dateformat)
200 except ValueError:
201 self.fail('Date value not in %r format' % dateformat)
202
203 def test_reporthook(self):
204 records = []

Callers

nothing calls this directly

Calls 4

urlretrieveMethod · 0.95
getMethod · 0.45
strptimeMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected