Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
- Fix broken tests.
- Additional repo cleanup.
  • Loading branch information
mbogosian authored and posita committed Mar 23, 2017
1 parent cb149fa commit 77d20cf
Show file tree
Hide file tree
Showing 7 changed files with 289 additions and 247 deletions.
17 changes: 9 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
__pycache__/
.cache/
.eggs/
*.egg
*.egg-info/
*.pyc
*~
/.cache/
/.eggs/
/.idea/
/.tox/
/build/
/dist/
/docs/_build/
/setuptools-3.1.zip
__pycache__/
.DS_Store
*.egg
*.egg-info/
*.pyc
*.pyo
*~
21 changes: 9 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ Dropbox for Python
:target: https://pypi.python.org/pypi/dropbox
:alt: [Latest Release Development Stage]


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

Install via ``pip``:

.. code-block:: bash
.. code-block:: console
$ pip install dropbox
Install from source:

.. code-block:: bash
.. code-block:: console
$ git clone git://github.com/dropbox/dropbox-sdk-python.git
$ cd dropbox-sdk-python
$ python setup.py install
After installation, to get started, open a Python console:

.. code-block:: python
.. code-block:: pycon
>>> import dropbox
>>> dbx = dropbox.Dropbox("YOUR_ACCESS_TOKEN")
Expand All @@ -76,8 +74,7 @@ token for your own Dropbox account.
Examples
--------

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

Documentation
-------------
Expand All @@ -97,7 +94,7 @@ pin to a version of our `API spec

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

.. code-block:: bash
.. code-block:: console
$ git submodule init
$ git submodule update
Expand All @@ -107,7 +104,7 @@ version.

Now, run the included script:

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

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

.. code-block:: bash
.. code-block:: console
$ DROPBOX_TOKEN=... DROPBOX_TEAM_TOKEN=... tox
If you only want to test the API v2 client, use:

.. code-block:: bash
.. code-block:: console
$ DROPBOX_TOKEN=... DROPBOX_TEAM_TOKEN=... tox -- -k TestDropbox
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
[aliases]
test=pytest

[metadata]
description-file=README.rst

[tool:pytest]
norecursedirs = .tox .venv .venv-* stone
33 changes: 13 additions & 20 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# where package_data is expected to be str and not unicode.
from __future__ import absolute_import, division, print_function

import codecs
import os
import sys

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

with open('LICENSE') as f:
LICENSE = f.read()

with open('README.rst') as f:
with codecs.open('README.rst', encoding='utf-8') as f:
README = f.read()

dist = setup(
name='dropbox',
version=version,
description='Official Dropbox API Client',
author='Dropbox',
author_email='[email protected]',
url='http://www.dropbox.com/developers',
install_requires=install_reqs,
setup_requires=setup_requires,
tests_require=test_reqs,
license=LICENSE,
zip_safe=False,
packages=['dropbox'],
package_data={'dropbox': ['trusted-certs.crt']},
zip_safe=False,
author_email='[email protected]',
author='Dropbox',
description='Official Dropbox API Client',
license='MIT License',
long_description=README,
platforms=[
'CPython 2.7',
'CPython 3.3',
'CPython 3.4',
'CPython 3.5',
'CPython 3.6',
],
url='http://www.dropbox.com/developers',
# From <https://pypi.python.org/pypi?%3Aaction=list_classifiers>
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX',
'Operating System :: Microsoft :: Windows',
'Operating System :: MacOS :: MacOS X',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)
Loading

0 comments on commit 77d20cf

Please sign in to comment.