MCPcopy Create free account
hub / github.com/apache/arrow / test_sequence_duration

Function test_sequence_duration

python/pyarrow/tests/test_convert_builtin.py:1498–1509  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1496
1497
1498def test_sequence_duration():
1499 td1 = datetime.timedelta(2, 3601, 1)
1500 td2 = datetime.timedelta(1, 100, 1000)
1501 data = [td1, None, td2]
1502
1503 arr = pa.array(data)
1504 assert len(arr) == 3
1505 assert arr.type == pa.duration('us')
1506 assert arr.null_count == 1
1507 assert arr[0].as_py() == td1
1508 assert arr[1].as_py() is None
1509 assert arr[2].as_py() == td2
1510
1511
1512@pytest.mark.numpy

Callers

nothing calls this directly

Calls 3

lenFunction · 0.85
as_pyMethod · 0.80
arrayMethod · 0.45

Tested by

no test coverage detected