diff options
author | rahulp13 | 2020-03-03 05:38:24 +0530 |
---|---|---|
committer | rahulp13 | 2020-03-03 05:38:24 +0530 |
commit | 07cc7e03ba5e91c14abc854231ce975109563616 (patch) | |
tree | c00d44222bba1dc31a899987581ccebe1424a2c6 /Windows/dateutil/test/test_utils.py | |
parent | dfc268e0863c913a1b8726cd54eea3b40caf7c67 (diff) | |
download | eSim-07cc7e03ba5e91c14abc854231ce975109563616.tar.gz eSim-07cc7e03ba5e91c14abc854231ce975109563616.tar.bz2 eSim-07cc7e03ba5e91c14abc854231ce975109563616.zip |
packaging with pyinstaller - Windows OS
Diffstat (limited to 'Windows/dateutil/test/test_utils.py')
-rw-r--r-- | Windows/dateutil/test/test_utils.py | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/Windows/dateutil/test/test_utils.py b/Windows/dateutil/test/test_utils.py deleted file mode 100644 index fcdec1a5..00000000 --- a/Windows/dateutil/test/test_utils.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals -from datetime import timedelta, datetime - -import unittest - -from dateutil import tz -from dateutil import utils -from dateutil.utils import within_delta - -from freezegun import freeze_time - -UTC = tz.tzutc() -NYC = tz.gettz("America/New_York") - - -class UtilsTest(unittest.TestCase): - @freeze_time(datetime(2014, 12, 15, 1, 21, 33, 4003)) - def testToday(self): - self.assertEqual(utils.today(), datetime(2014, 12, 15, 0, 0, 0)) - - @freeze_time(datetime(2014, 12, 15, 12), tz_offset=5) - def testTodayTzInfo(self): - self.assertEqual(utils.today(NYC), - datetime(2014, 12, 15, 0, 0, 0, tzinfo=NYC)) - - @freeze_time(datetime(2014, 12, 15, 23), tz_offset=5) - def testTodayTzInfoDifferentDay(self): - self.assertEqual(utils.today(UTC), - datetime(2014, 12, 16, 0, 0, 0, tzinfo=UTC)) - - def testDefaultTZInfoNaive(self): - dt = datetime(2014, 9, 14, 9, 30) - self.assertIs(utils.default_tzinfo(dt, NYC).tzinfo, - NYC) - - def testDefaultTZInfoAware(self): - dt = datetime(2014, 9, 14, 9, 30, tzinfo=UTC) - self.assertIs(utils.default_tzinfo(dt, NYC).tzinfo, - UTC) - - def testWithinDelta(self): - d1 = datetime(2016, 1, 1, 12, 14, 1, 9) - d2 = d1.replace(microsecond=15) - - self.assertTrue(within_delta(d1, d2, timedelta(seconds=1))) - self.assertFalse(within_delta(d1, d2, timedelta(microseconds=1))) - - def testWithinDeltaWithNegativeDelta(self): - d1 = datetime(2016, 1, 1) - d2 = datetime(2015, 12, 31) - - self.assertTrue(within_delta(d2, d1, timedelta(days=-1))) |