scikit-learn/sklearn/utils/tests/test_bench.py

12 lines
281 B
Python
Raw Normal View History

import datetime
from sklearn.utils.bench import total_seconds
from nose.tools import assert_equal
def test_total_seconds():
2012-12-22 20:02:50 +08:00
delta = (datetime.datetime(2012, 1, 1, 5, 5, 1)
- datetime.datetime(2012, 1, 1, 5, 5, 4))
assert_equal(86397, total_seconds(delta))