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

Method test_caseinsensitive

Lib/test/test_strptime.py:615–623  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

613 "handling of percent sign failed")
614
615 def test_caseinsensitive(self):
616 # Should handle names case-insensitively.
617 strf_output = time.strftime("%B", self.time_tuple)
618 self.assertTrue(_strptime._strptime_time(strf_output.upper(), "%B"),
619 "strptime does not handle ALL-CAPS names properly")
620 self.assertTrue(_strptime._strptime_time(strf_output.lower(), "%B"),
621 "strptime does not handle lowercase names properly")
622 self.assertTrue(_strptime._strptime_time(strf_output.capitalize(), "%B"),
623 "strptime does not handle capword names properly")
624
625 def test_defaults(self):
626 # Default return value should be (1900, 1, 1, 0, 0, 0, 0, 1, 0)

Callers

nothing calls this directly

Calls 5

assertTrueMethod · 0.80
strftimeMethod · 0.45
upperMethod · 0.45
lowerMethod · 0.45
capitalizeMethod · 0.45

Tested by

no test coverage detected