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

Method test_cert_time_to_seconds_locale

Lib/test/test_ssl.py:952–964  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

950
951 @support.run_with_locale('LC_ALL', '')
952 def test_cert_time_to_seconds_locale(self):
953 # `cert_time_to_seconds()` should be locale independent
954
955 def local_february_name():
956 return time.strftime('%b', (1, 2, 3, 4, 5, 6, 0, 0, 0))
957
958 if local_february_name().lower() == 'feb':
959 self.skipTest("locale-specific month name needs to be "
960 "different from C locale")
961
962 # locale-independent
963 self.cert_time_ok("Feb 9 00:00:00 2007 GMT", 1170979200.0)
964 self.cert_time_fail(local_february_name() + " 9 00:00:00 2007 GMT")
965
966 def test_connect_ex_error(self):
967 server = socket.socket(socket.AF_INET)

Callers

nothing calls this directly

Calls 4

cert_time_okMethod · 0.95
cert_time_failMethod · 0.95
skipTestMethod · 0.80
lowerMethod · 0.45

Tested by

no test coverage detected