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

Function test_multiply

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

Source from the content-addressed store, hash-verified

6
7
8def test_multiply():
9 it = pendulum.duration(days=6, seconds=34, microseconds=522222)
10 mul = it * 2
11
12 assert isinstance(mul, pendulum.Duration)
13 assert_duration(mul, 0, 0, 1, 5, 0, 1, 9, 44444)
14
15 it = pendulum.duration(days=6, seconds=34, microseconds=522222)
16 mul = 2 * it
17
18 assert isinstance(mul, pendulum.Duration)
19 assert_duration(mul, 0, 0, 1, 5, 0, 1, 9, 44444)
20
21 it = pendulum.duration(
22 years=2, months=3, weeks=4, days=6, seconds=34, microseconds=522222
23 )
24 mul = 2 * it
25
26 assert isinstance(mul, pendulum.Duration)
27 assert_duration(mul, 4, 6, 9, 5, 0, 1, 9, 44444)
28
29
30def test_divide():

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…