Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Commit fa451e7

Browse files
committed
sync branch with master
2 parents b431a38 + bc8dd1e commit fa451e7

6 files changed

Lines changed: 184 additions & 75 deletions

File tree

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ language: python
22
sudo: false
33
python:
44
- "2.7"
5-
- "3.5"
65

76
before_install:
87
- pip install codecov

Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
.PHONY: docs test
21

32
help:
43
@echo " env create a development environment using virtualenv"
54
@echo " deps install dependencies"
65
@echo " clean remove unwanted stuff"
76
@echo " lint check style with flake8"
7+
@echo " coverage run tests with code coverage"
88
@echo " test run tests"
99

1010
env:
@@ -27,8 +27,15 @@ clean:
2727
lint:
2828
flake8 twitter > violations.flake8.txt
2929

30+
coverage:
31+
nosetests --with-coverage --cover-package=twitter
32+
3033
test:
31-
python test.py
34+
nosetests
35+
36+
build: clean
37+
python setup.py sdist
38+
python setup.py bdist_wheel
3239

3340
upload: clean
3441
python setup.py sdist upload

README.rst

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,21 @@ A Python wrapper around the Twitter API.
44

55
By the `Python-Twitter Developers <python-twitter@googlegroups.com>`_
66

7-
.. image:: https://pypip.in/wheel/python-twitter/badge.png
8-
:target: https://pypi.python.org/pypi/python-twitter/
9-
:alt: Wheel Status
7+
.. image:: https://img.shields.io/pypi/v/python-twitter.svg
8+
:target: https://pypi.python.org/pypi/parsedatetime/
9+
:alt: Downloads
10+
11+
.. image:: https://travis-ci.org/bear/python-twitter.svg?branch=master
12+
:target: https://travis-ci.org/bear/python-twitter
13+
:alt: Travis CI
14+
15+
.. image:: http://codecov.io/github/bear/python-twitter/coverage.svg?branch=master
16+
:target: http://codecov.io/github/bear/python-twitter
17+
:alt: Codecov
18+
19+
.. image:: https://requires.io/github/bear/python-twitter/requirements.svg?branch=master
20+
:target: https://requires.io/github/bear/python-twitter/requirements/?branch=master
21+
:alt: Requirements Status
1022

1123
============
1224
Introduction
@@ -24,10 +36,6 @@ You can install python-twitter using::
2436

2537
$ pip install python-twitter
2638

27-
Testing::
28-
29-
$ python test.py
30-
3139
================
3240
Getting the code
3341
================
@@ -47,14 +55,18 @@ Activate the virtual environment created:
4755

4856
$ source env/bin/activate
4957

50-
Run tests:
58+
=============
59+
Running Tests
60+
=============
61+
Note that tests require ```pip install nose``` and optionally ```pip install coverage```:
5162

52-
$ make test
63+
To run the unit tests:
5364

54-
To see other options available, run:
65+
$ make test
5566

56-
$ make help
67+
to also run code coverage:
5768

69+
$ make coverage
5870

5971
=============
6072
Documentation

coveragerc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[run]
2+
source = twitter

get_access_token.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525

2626
def get_access_token(consumer_key, consumer_secret):
27-
oauth_client = OAuth1Session(consumer_key, client_secret=consumer_secret)
27+
oauth_client = OAuth1Session(consumer_key, client_secret=consumer_secret, callback_uri='oob')
2828

2929
print 'Requesting temp token from Twitter'
3030

0 commit comments

Comments
 (0)