File: test_bench.py

package info (click to toggle)
scikit-learn 0.18-5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 71,040 kB
  • ctags: 91,142
  • sloc: python: 97,257; ansic: 8,360; cpp: 5,649; makefile: 242; sh: 238
file content (11 lines) | stat: -rw-r--r-- 281 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11

import datetime

from sklearn.utils.bench import total_seconds
from nose.tools 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))