Skip to content

Commit 77d20cf

Browse files
mbogosianposita
authored andcommitted
Fix tests
- Fix broken tests. - Additional repo cleanup.
1 parent cb149fa commit 77d20cf

File tree

7 files changed

+289
-247
lines changed

7 files changed

+289
-247
lines changed

.gitignore

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
__pycache__/
2-
.cache/
3-
.eggs/
4-
*.egg
5-
*.egg-info/
6-
*.pyc
7-
*~
1+
/.cache/
2+
/.eggs/
83
/.idea/
94
/.tox/
105
/build/
116
/dist/
127
/docs/_build/
13-
/setuptools-3.1.zip
8+
__pycache__/
9+
.DS_Store
10+
*.egg
11+
*.egg-info/
12+
*.pyc
13+
*.pyo
14+
*~

README.rst

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ Dropbox for Python
2828
:target: https://pypi.python.org/pypi/dropbox
2929
:alt: [Latest Release Development Stage]
3030

31-
3231
A Python SDK for integrating with the Dropbox API v2. Compatible with Python
3332
2.7 and 3.4+. Documentation is available on `Read the Docs
3433
<http://dropbox-sdk-python.readthedocs.org/>`_.
@@ -38,22 +37,21 @@ Installation
3837

3938
Install via ``pip``:
4039

41-
.. code-block:: bash
40+
.. code-block:: console
4241
4342
$ pip install dropbox
4443
45-
4644
Install from source:
4745

48-
.. code-block:: bash
46+
.. code-block:: console
4947
5048
$ git clone git://github.com/dropbox/dropbox-sdk-python.git
5149
$ cd dropbox-sdk-python
5250
$ python setup.py install
5351
5452
After installation, to get started, open a Python console:
5553

56-
.. code-block:: python
54+
.. code-block:: pycon
5755
5856
>>> import dropbox
5957
>>> dbx = dropbox.Dropbox("YOUR_ACCESS_TOKEN")
@@ -76,8 +74,7 @@ token for your own Dropbox account.
7674
Examples
7775
--------
7876

79-
An example, `updown.py <example/updown.py>`_, can be found in the examples directory, which
80-
demonstrates how to sync a local directory with a Dropbox.
77+
``example/updown.py`` demonstrates how to sync a local directory with a Dropbox.
8178

8279
Documentation
8380
-------------
@@ -97,7 +94,7 @@ pin to a version of our `API spec
9794

9895
To prepare the repo for generation, run these commands after cloning:
9996

100-
.. code-block:: bash
97+
.. code-block:: console
10198
10299
$ git submodule init
103100
$ git submodule update
@@ -107,7 +104,7 @@ version.
107104

108105
Now, run the included script:
109106

110-
.. code-block:: bash
107+
.. code-block:: console
111108
112109
$ ./generate_base_client.py
113110
@@ -126,7 +123,7 @@ We use the `tox <https://tox.readthedocs.org/>`_ package to run tests in Python
126123
2 and 3. To install, use :code:`pip install tox`. Once installed, run `tox` from the
127124
root directory. You'll need to specify a working Dropbox OAuth2 token:
128125

129-
.. code-block:: bash
126+
.. code-block:: console
130127
131128
$ DROPBOX_TOKEN=YOUR_TOKEN tox -- -k "'not test_team'"
132129
@@ -135,12 +132,12 @@ Note that we skip ``test_team`` which requires a team token with `Member File Ac
135132
To test this functionality, specify a ``DROPBOX_TEAM_TOKEN`` environment
136133
variable.
137134

138-
.. code-block:: bash
135+
.. code-block:: console
139136
140137
$ DROPBOX_TOKEN=... DROPBOX_TEAM_TOKEN=... tox
141138
142139
If you only want to test the API v2 client, use:
143140

144-
.. code-block:: bash
141+
.. code-block:: console
145142
146143
$ DROPBOX_TOKEN=... DROPBOX_TEAM_TOKEN=... tox -- -k TestDropbox

setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@
22
[aliases]
33
test=pytest
44

5+
[metadata]
6+
description-file=README.rst
7+
58
[tool:pytest]
69
norecursedirs = .tox .venv .venv-* stone

setup.py

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# where package_data is expected to be str and not unicode.
33
from __future__ import absolute_import, division, print_function
44

5+
import codecs
56
import os
67
import sys
78

@@ -43,46 +44,38 @@
4344
with open('test/requirements.txt') as f:
4445
test_reqs += f.read().splitlines()
4546

46-
with open('LICENSE') as f:
47-
LICENSE = f.read()
48-
49-
with open('README.rst') as f:
47+
with codecs.open('README.rst', encoding='utf-8') as f:
5048
README = f.read()
5149

5250
dist = setup(
5351
name='dropbox',
5452
version=version,
55-
description='Official Dropbox API Client',
56-
author='Dropbox',
57-
author_email='[email protected]',
58-
url='http://www.dropbox.com/developers',
5953
install_requires=install_reqs,
6054
setup_requires=setup_requires,
6155
tests_require=test_reqs,
62-
license=LICENSE,
63-
zip_safe=False,
6456
packages=['dropbox'],
6557
package_data={'dropbox': ['trusted-certs.crt']},
58+
zip_safe=False,
59+
author_email='[email protected]',
60+
author='Dropbox',
61+
description='Official Dropbox API Client',
62+
license='MIT License',
6663
long_description=README,
67-
platforms=[
68-
'CPython 2.7',
69-
'CPython 3.3',
70-
'CPython 3.4',
71-
'CPython 3.5',
72-
'CPython 3.6',
73-
],
64+
url='http://www.dropbox.com/developers',
65+
# From <https://pypi.python.org/pypi?%3Aaction=list_classifiers>
7466
classifiers=[
7567
'Development Status :: 4 - Beta',
7668
'Intended Audience :: Developers',
7769
'License :: OSI Approved :: MIT License',
78-
'Operating System :: POSIX',
79-
'Operating System :: Microsoft :: Windows',
80-
'Operating System :: MacOS :: MacOS X',
70+
'Operating System :: OS Independent',
71+
'Programming Language :: Python',
8172
'Programming Language :: Python :: 2.7',
8273
'Programming Language :: Python :: 3.3',
8374
'Programming Language :: Python :: 3.4',
8475
'Programming Language :: Python :: 3.5',
8576
'Programming Language :: Python :: 3.6',
77+
'Programming Language :: Python :: Implementation :: CPython',
78+
'Programming Language :: Python :: Implementation :: PyPy',
8679
'Topic :: Software Development :: Libraries :: Python Modules',
8780
],
8881
)

0 commit comments

Comments
 (0)