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

Method test_formatdate_usegmt

Lib/test/test_email/test_email.py:3089–3096  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3087 time.localtime(now)[:6])
3088
3089 def test_formatdate_usegmt(self):
3090 now = time.time()
3091 self.assertEqual(
3092 utils.formatdate(now, localtime=False),
3093 time.strftime('%a, %d %b %Y %H:%M:%S -0000', time.gmtime(now)))
3094 self.assertEqual(
3095 utils.formatdate(now, localtime=False, usegmt=True),
3096 time.strftime('%a, %d %b %Y %H:%M:%S GMT', time.gmtime(now)))
3097
3098 # parsedate and parsedate_tz will become deprecated interfaces someday
3099 def test_parsedate_returns_None_for_invalid_strings(self):

Callers

nothing calls this directly

Calls 3

timeMethod · 0.45
assertEqualMethod · 0.45
strftimeMethod · 0.45

Tested by

no test coverage detected