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

Function test_multiply

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

Source from the content-addressed store, hash-verified

6
7
8def test_multiply():
9 dt1 = pendulum.DateTime(2016, 8, 7, 12, 34, 56)
10 dt2 = dt1.add(days=6, seconds=34)
11 it = pendulum.interval(dt1, dt2)
12 mul = it * 2
13 assert isinstance(mul, pendulum.Duration)
14 assert_duration(mul, 0, 0, 1, 5, 0, 1, 8)
15
16 dt1 = pendulum.DateTime(2016, 8, 7, 12, 34, 56)
17 dt2 = dt1.add(days=6, seconds=34)
18 it = pendulum.interval(dt1, dt2)
19 mul = it * 2
20 assert isinstance(mul, pendulum.Duration)
21 assert_duration(mul, 0, 0, 1, 5, 0, 1, 8)
22
23
24def test_divide():

Callers

nothing calls this directly

Calls 2

addMethod · 0.95
assert_durationFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…