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

Function test_quarter_tokens

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

Source from the content-addressed store, hash-verified

27
28
29def test_quarter_tokens():
30 f = Formatter()
31 d = pendulum.datetime(1985, 1, 4)
32 assert f.format(d, "Q") == "1"
33
34 d = pendulum.datetime(2029, 8, 1)
35 assert f.format(d, "Q") == "3"
36
37 d = pendulum.datetime(1985, 1, 4)
38 assert f.format(d, "Qo") == "1st"
39
40 d = pendulum.datetime(2029, 8, 1)
41 assert f.format(d, "Qo") == "3rd"
42
43 d = pendulum.datetime(1985, 1, 4)
44 assert f.format(d, "Qo", locale="fr") == "1er"
45
46 d = pendulum.datetime(2029, 8, 1)
47 assert f.format(d, "Qo", locale="fr") == "3e"
48
49
50def test_month_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…