#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2016 Damian Ziobro <damian@xmementoit.com>

import unittest
import datetime

class TestDatetimeMethods(unittest.TestCase):

    def setUp(self):
        self.sampleDate      = datetime.date(2016,11,23)
        self.sampleTime      = datetime.time(10,30,50)

    def test_dateConstructor(self):
        self.assertEqual(str(self.sampleDate), "2016-11-23")

    def test_timeConstructor(self):
        self.assertEqual(str(self.sampleTime), "10:30:50")

    def test_timedelta(self):
        self.assertEqual(str(datetime.timedelta(minutes=30, hours=8, seconds=20)), "8:30:20")


if __name__ == "__main__": 
    print ("running unittests for datetime")
    unittest.main();

@@ -651,16 +651,137 @@
 0:20%22)%0A%0A
+    def test_datetoday(self):%0A        self.assertEqual(str(datetime.date.today()), str(datetime.datetime.now().date()))%0A%0A
 %0Aif __na

test datetime.now() and date.today()