potluck.tests.test_time_utils
Tests of the time_utils module.
test_time_utils.py
1""" 2Tests of the time_utils module. 3 4test_time_utils.py 5""" 6 7import datetime 8 9from .. import time_utils 10 11 12def test_time_strings(): 13 """ 14 Very basic test of time strings conversion. 15 """ 16 now = time_utils.timestring() 17 conv = time_utils.time_from_timestring(now) 18 conv2 = time_utils.timestring(conv) 19 assert now == conv2 20 21 when = datetime.datetime(year=1998, month=8, day=3) 22 ts = time_utils.timestring(when) 23 conv = time_utils.time_from_timestring(ts) 24 conv2 = time_utils.timestring(conv) 25 assert ts == conv2
def
test_time_strings():
13def test_time_strings(): 14 """ 15 Very basic test of time strings conversion. 16 """ 17 now = time_utils.timestring() 18 conv = time_utils.time_from_timestring(now) 19 conv2 = time_utils.timestring(conv) 20 assert now == conv2 21 22 when = datetime.datetime(year=1998, month=8, day=3) 23 ts = time_utils.timestring(when) 24 conv = time_utils.time_from_timestring(ts) 25 conv2 = time_utils.timestring(conv) 26 assert ts == conv2
Very basic test of time strings conversion.