Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9311965
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
View Options
diff --git a/swh/loader/git/tests/test_utils.py b/swh/loader/git/tests/test_utils.py
index b288d2b..adb20c4 100644
--- a/swh/loader/git/tests/test_utils.py
+++ b/swh/loader/git/tests/test_utils.py
@@ -1,35 +1,35 @@
# Copyright (C) 2015-2017 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
import unittest
from nose.tools import istest
from swh.loader.git import utils
class TestUtils(unittest.TestCase):
@istest
def check_date_time(self):
"""A long as datetime is fine, date time check does not raise
"""
for e in range(32, 37):
ts = 2**e
utils.check_date_time(ts)
@istest
def check_date_time_empty_value(self):
self.assertIsNone(utils.check_date_time(None))
@istest
def check_date_time_raises(self):
"""From a give threshold, check will no longer works.
"""
exp = 38
timestamp = 2**exp
- with self.assertRaisesRegex(ValueError, 'year is out of range'):
+ with self.assertRaisesRegex(ValueError, 'is out of range'):
utils.check_date_time(timestamp)
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Jul 3, 10:38 AM (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3252987
Attached To
rDLDG Git loader
Event Timeline
Log In to Comment