

def test_timeval(self):
    from _testcapi import pytime_object_to_timeval
    for (obj, timeval) in ((0, (0, 0)), ((- 1), ((- 1), 0)), ((- 1.0), ((- 1), 0)), (1e-06, (0, 1)), ((- 1e-06), ((- 1), 999999)), ((- 1.2), ((- 2), 800000)), (1.123456, (1, 123456)), (1.1234569, (1, 123456)), ((- 1.123456), ((- 2), 876544)), ((- 1.1234561), ((- 2), 876543))):
        self.assertEqual(pytime_object_to_timeval(obj), timeval)
    for invalid in self.invalid_values:
        self.assertRaises(OverflowError, pytime_object_to_timeval, invalid)

dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/test/test_time.py TestPytime.test_timeval/original