MCPcopy Index your code
hub / github.com/python-pendulum/pendulum / test_month_tokens

Function test_month_tokens

tests/formatting/test_formatter.py:50–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48
49
50def test_month_tokens():
51 f = Formatter()
52 d = pendulum.datetime(2016, 3, 24)
53 assert f.format(d, "MM") == "03"
54 assert f.format(d, "M") == "3"
55
56 assert f.format(d, "MMM") == "Mar"
57 assert f.format(d, "MMMM") == "March"
58 assert f.format(d, "Mo") == "3rd"
59
60 assert f.format(d, "MMM", locale="fr") == "mars"
61 assert f.format(d, "MMMM", locale="fr") == "mars"
62 assert f.format(d, "Mo", locale="fr") == "3e"
63
64
65def test_day_tokens():

Callers

nothing calls this directly

Calls 3

formatMethod · 0.95
FormatterClass · 0.90
datetimeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…