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

Function test_rfc_3339_extended

tests/parsing/test_parsing.py:116–141  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

114
115
116def test_rfc_3339_extended():
117 text = "2016-10-06T12:34:56.123456+05:30"
118
119 parsed = parse(text)
120
121 assert parsed.year == 2016
122 assert parsed.month == 10
123 assert parsed.day == 6
124 assert parsed.hour == 12
125 assert parsed.minute == 34
126 assert parsed.second == 56
127 assert parsed.microsecond == 123456
128 assert parsed.utcoffset().total_seconds() == 19800
129
130 text = "2016-10-06T12:34:56.000123+05:30"
131
132 parsed = parse(text)
133
134 assert parsed.year == 2016
135 assert parsed.month == 10
136 assert parsed.day == 6
137 assert parsed.hour == 12
138 assert parsed.minute == 34
139 assert parsed.second == 56
140 assert parsed.microsecond == 123
141 assert parsed.utcoffset().total_seconds() == 19800
142
143
144def test_rfc_3339_extended_nanoseconds():

Callers

nothing calls this directly

Calls 3

parseFunction · 0.90
utcoffsetMethod · 0.80
total_secondsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…