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

Function test_day_of_week

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

Source from the content-addressed store, hash-verified

98
99
100def test_day_of_week():
101 f = Formatter()
102 d = pendulum.datetime(2016, 8, 28)
103 assert f.format(d, "d") == "0"
104
105 assert f.format(d, "dd") == "Su"
106 assert f.format(d, "ddd") == "Sun"
107 assert f.format(d, "dddd") == "Sunday"
108
109 assert f.format(d, "dd", locale="fr") == "di"
110 assert f.format(d, "ddd", locale="fr") == "dim."
111 assert f.format(d, "dddd", locale="fr") == "dimanche"
112
113 assert f.format(d, "do") == "0th"
114
115
116def test_localized_day_of_week():

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…