laywerrobot/lib/python3.6/site-packages/sklearn/utils/tests/test_bench.py

12 lines
292 B
Python
Raw Normal View History

2020-08-27 21:55:39 +02:00
import datetime
from sklearn.utils.bench import total_seconds
from sklearn.utils.testing import assert_equal
def test_total_seconds():
delta = (datetime.datetime(2012, 1, 1, 5, 5, 1)
- datetime.datetime(2012, 1, 1, 5, 5, 4))
assert_equal(86397, total_seconds(delta))