Skip to content

Commit

Permalink
Improved docs for running tests locally
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Mar 3, 2017
1 parent 87f0c33 commit 28db2c0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Expand Up @@ -22,9 +22,9 @@ before_install:
install:
- |
if [ "$TEST_TYPE" = build ]; then
pip install pytest==3.0.2 pytest-cov pytest-benchmark coveralls six pytest-django==2.9.1 mock django-filter
pip install -e .[test]
pip install psycopg2 # Required for Django postgres fields testing
pip install django==$DJANGO_VERSION
pip install -e .
python setup.py develop
elif [ "$TEST_TYPE" = lint ]; then
pip install flake8
Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -99,13 +99,13 @@ To learn more check out the following [examples](examples/):
After cloning this repo, ensure dependencies are installed by running:

```sh
python setup.py install
pip install -e ".[test]"
```

After developing, the full test suite can be evaluated by running:

```sh
python setup.py test # Use --pytest-args="-v -s" for verbose mode
py.test graphene_django --cov=graphene_django # Use -v -s for verbose mode
```


Expand Down
8 changes: 4 additions & 4 deletions README.rst
Expand Up @@ -109,21 +109,21 @@ After cloning this repo, ensure dependencies are installed by running:

.. code:: sh
python setup.py install
pip install -e ".[test]"
After developing, the full test suite can be evaluated by running:

.. code:: sh
python setup.py test # Use --pytest-args="-v -s" for verbose mode
py.test graphene_django --cov=graphene_django # Use -v -s for verbose mode
Documentation
~~~~~~~~~~~~~

The documentation can be generated using the excellent
The documentation is generated using the excellent
`Sphinx <http://www.sphinx-doc.org/>`__ and a custom theme.

To install the documentation dependencies, run the following:
The documentation dependencies are installed by running:

.. code:: sh
Expand Down
22 changes: 14 additions & 8 deletions setup.py
@@ -1,5 +1,15 @@
from setuptools import find_packages, setup

tests_require = [
'pytest>=2.7.2',
'pytest-cov',
'coveralls',
'mock',
'pytz',
'django-filter',
'pytest-django==2.9.1',
]

setup(
name='graphene-django',
version='1.2.1',
Expand Down Expand Up @@ -41,14 +51,10 @@
setup_requires=[
'pytest-runner',
],
tests_require=[
'django-filter>=1.0.0',
'pytest',
'pytest-django==2.9.1',
'mock',
# Required for Django postgres fields testing
'psycopg2',
],
tests_require=tests_require,
extras_require={
'test': tests_require,
},
include_package_data=True,
zip_safe=False,
platforms='any',
Expand Down

0 comments on commit 28db2c0

Please sign in to comment.