diff options
author | Gerhard Weis <g.weis@griffith.edu.au> | 2017-07-05 20:54:03 +1000 |
---|---|---|
committer | Gerhard Weis <g.weis@griffith.edu.au> | 2017-07-05 20:54:03 +1000 |
commit | 0d0abd79a975ed132a8eb43783f87cd84eea9267 (patch) | |
tree | 733231867f0ff1ba3679e1d4564a1b2506353cb2 /src/isodate/tests/test_pickle.py | |
parent | 1dc3c2481ba32e9dbcad9e55d2c20281f5aa5756 (diff) | |
parent | 6e5802bf7b410551f1dfcaf6ede8638f0f233cad (diff) | |
download | isodate-0d0abd79a975ed132a8eb43783f87cd84eea9267.tar.gz |
Merge branch 'master' of https://github.com/lmazuel/isodate
# Conflicts:
# .travis.yml
# setup.cfg
# src/isodate/tzinfo.py
Diffstat (limited to 'src/isodate/tests/test_pickle.py')
-rw-r--r-- | src/isodate/tests/test_pickle.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/isodate/tests/test_pickle.py b/src/isodate/tests/test_pickle.py index 4b824e7..0d8c184 100644 --- a/src/isodate/tests/test_pickle.py +++ b/src/isodate/tests/test_pickle.py @@ -1,5 +1,8 @@ +try: + import cPickle as pickle +except ImportError: + import pickle import unittest -import cPickle as pickle import isodate @@ -31,7 +34,7 @@ class TestPickle(unittest.TestCase): pikl = pickle.dumps(dur, proto) if dur != pickle.loads(pikl): raise Exception("not equal") - except Exception, e: + except Exception as e: failed.append("pickle proto %d failed (%s)" % (proto, repr(e))) self.assertEqual(len(failed), 0, "pickle protos failed: %s" % str(failed)) |