A test for the fail case in issue #193.
[ci skip]
"""Unit tests"""
+class TweepyErrorTests(unittest.TestCase):
+
+ def testpickle(self):
+ """Verify exceptions can be pickled and unpickled."""
+ import pickle
+ from tweepy.error import TweepError
+
+ e = TweepError('no reason', {'status': 200})
+ e2 = pickle.loads(pickle.dumps(e))
+
+ self.assertEqual(e.reason, e2.reason)
+ self.assertEqual(e.response, e2.response)
class TweepyAPITests(unittest.TestCase):