diff options
author | Anil Khatri <27620628+imkaka@users.noreply.github.com> | 2019-10-23 23:37:43 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-23 23:37:43 +0530 |
commit | abb18968516c6c3c9e1d736bfe6f435392b3d3af (patch) | |
tree | 46b45bc52901f0f52526f9573f06b2fc0f777231 /git/test/test_util.py | |
parent | 284f89d768080cb86e0d986bfa1dd503cfe6b682 (diff) | |
parent | dfa0eac1578bff14a8f7fa00bfc3c57aba24f877 (diff) | |
download | gitpython-abb18968516c6c3c9e1d736bfe6f435392b3d3af.tar.gz |
Merge branch 'master' into fix/deepsource-issues
Diffstat (limited to 'git/test/test_util.py')
-rw-r--r-- | git/test/test_util.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/git/test/test_util.py b/git/test/test_util.py index b5f9d222..a4d9d7ad 100644 --- a/git/test/test_util.py +++ b/git/test/test_util.py @@ -4,6 +4,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php +import pickle import tempfile import time from unittest import skipIf @@ -280,3 +281,9 @@ class TestUtils(TestBase): # Wrong offset: UTC-9000, should return datetime + tzoffset(UTC) altz = utctz_to_altz('-9000') self.assertEqual(datetime.fromtimestamp(1522827734, tzoffset(0)), from_timestamp(1522827734, altz)) + + def test_pickle_tzoffset(self): + t1 = tzoffset(555) + t2 = pickle.loads(pickle.dumps(t1)) + self.assertEqual(t1._offset, t2._offset) + self.assertEqual(t1._name, t2._name) |