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

Function test_floor_divide

tests/duration/test_arithmetic.py:62–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60
61
62def test_floor_divide():
63 it = pendulum.duration(days=2, seconds=34, microseconds=522222)
64 mul = it // 2
65
66 assert isinstance(mul, pendulum.Duration)
67 assert_duration(mul, 0, 0, 0, 1, 0, 0, 17, 261111)
68
69 it = pendulum.duration(days=2, seconds=35, microseconds=522222)
70 mul = it // 3
71
72 assert isinstance(mul, pendulum.Duration)
73 assert_duration(mul, 0, 0, 0, 0, 16, 0, 11, 840740)
74
75 it = pendulum.duration(years=2, months=4, days=2, seconds=34, microseconds=522222)
76 mul = it // 2
77
78 assert isinstance(mul, pendulum.Duration)
79 assert_duration(mul, 1, 2, 0, 1, 0, 0, 17, 261111)
80
81 it = pendulum.duration(years=2, months=4, days=2, seconds=35, microseconds=522222)
82 mul = it // 3
83
84 assert isinstance(mul, pendulum.Duration)
85 assert_duration(mul, 0, 1, 0, 0, 16, 0, 11, 840740)

Callers

nothing calls this directly

Calls 1

assert_durationFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…