Commit 5f4c71fb authored by inactivist's avatar inactivist
Browse files

Merge branch 'master' of https://github.com/tweepy/tweepy into geo-models

parents 490cc6b3 cf579f04
language: python
python:
- "2.7"
script: nosetests -v tests:TweepyAPITests tests:TweepyCursorTests tests:TweepyCacheTests
script: nosetests -v tests:TweepyAPITests tests:TweepyCursorTests tests:TweepyCacheTests tests:TweepyErrorTests
env:
TWITTER_USERNAME="tweepytest"
CONSUMER_KEY="cjgm143dG9adHpiB4BsoQ"
......
......@@ -48,9 +48,12 @@ copyright = u'2011, Joshua Roesslein'
# built documents.
#
# The short X.Y version.
version = '1.7'
sys.path.insert(0, '..')
from tweepy import __version__
version = __version__
# The full version, including alpha/beta/rc tags.
release = '1.7'
release = __version__
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
#!/usr/bin/env python
#from distutils.core import setup
from setuptools import setup, find_packages
from tweepy import __version__
setup(name="tweepy",
version="1.12",
version=__version__,
description="Twitter library for python",
license="MIT",
author="Joshua Roesslein",
......
......@@ -18,6 +18,18 @@ test_tweet_id = '266367358078169089'
"""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):
......
......@@ -8,6 +8,7 @@ class TweepError(Exception):
def __init__(self, reason, response=None):
self.reason = unicode(reason)
self.response = response
Exception.__init__(self, reason)
def __str__(self):
return self.reason
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment