diff options
author | Anil Khatri <anil.soccer.khatri@gmail.com> | 2019-10-23 23:51:15 +0530 |
---|---|---|
committer | Anil Khatri <anil.soccer.khatri@gmail.com> | 2019-10-23 23:51:15 +0530 |
commit | d4756f4a1298e053aaeae58b725863e8742d353a (patch) | |
tree | de992d78c7d5520d0112391c269b13a53ca6065c /git/test/test_util.py | |
parent | 1dc46d735003df8ff928974cb07545f69f8ea411 (diff) | |
parent | abb18968516c6c3c9e1d736bfe6f435392b3d3af (diff) | |
download | gitpython-d4756f4a1298e053aaeae58b725863e8742d353a.tar.gz |
Merge branch 'fix/deepsource-issues' of github.com:imkaka/GitPython 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) |