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

Function test_year_tokens

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

Source from the content-addressed store, hash-verified

18
19
20def test_year_tokens():
21 d = pendulum.datetime(2009, 1, 14, 15, 25, 50, 123456)
22 f = Formatter()
23
24 assert f.format(d, "YYYY") == "2009"
25 assert f.format(d, "YY") == "09"
26 assert f.format(d, "Y") == "2009"
27
28
29def test_quarter_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…