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

Function test_day_tokens

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

Source from the content-addressed store, hash-verified

63
64
65def test_day_tokens():
66 f = Formatter()
67 d = pendulum.datetime(2016, 3, 7)
68 assert f.format(d, "DD") == "07"
69 assert f.format(d, "D") == "7"
70
71 assert f.format(d, "Do") == "7th"
72 assert f.format(d.first_of("month"), "Do") == "1st"
73
74 assert f.format(d, "Do", locale="fr") == "7e"
75 assert f.format(d.first_of("month"), "Do", locale="fr") == "1er"
76
77
78def test_day_of_year():

Callers

nothing calls this directly

Calls 4

formatMethod · 0.95
FormatterClass · 0.90
datetimeMethod · 0.45
first_ofMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…