mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-02-16 19:40:36 +03:00
Improved docs for running tests locally
This commit is contained in:
parent
87f0c33983
commit
28db2c0506
|
@ -22,9 +22,9 @@ before_install:
|
||||||
install:
|
install:
|
||||||
- |
|
- |
|
||||||
if [ "$TEST_TYPE" = build ]; then
|
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 django==$DJANGO_VERSION
|
||||||
pip install -e .
|
|
||||||
python setup.py develop
|
python setup.py develop
|
||||||
elif [ "$TEST_TYPE" = lint ]; then
|
elif [ "$TEST_TYPE" = lint ]; then
|
||||||
pip install flake8
|
pip install flake8
|
||||||
|
|
|
@ -99,13 +99,13 @@ To learn more check out the following [examples](examples/):
|
||||||
After cloning this repo, ensure dependencies are installed by running:
|
After cloning this repo, ensure dependencies are installed by running:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
python setup.py install
|
pip install -e ".[test]"
|
||||||
```
|
```
|
||||||
|
|
||||||
After developing, the full test suite can be evaluated by running:
|
After developing, the full test suite can be evaluated by running:
|
||||||
|
|
||||||
```sh
|
```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
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -109,21 +109,21 @@ After cloning this repo, ensure dependencies are installed by running:
|
||||||
|
|
||||||
.. code:: sh
|
.. code:: sh
|
||||||
|
|
||||||
python setup.py install
|
pip install -e ".[test]"
|
||||||
|
|
||||||
After developing, the full test suite can be evaluated by running:
|
After developing, the full test suite can be evaluated by running:
|
||||||
|
|
||||||
.. code:: sh
|
.. 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
|
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.
|
`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
|
.. code:: sh
|
||||||
|
|
||||||
|
|
22
setup.py
22
setup.py
|
@ -1,5 +1,15 @@
|
||||||
from setuptools import find_packages, setup
|
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(
|
setup(
|
||||||
name='graphene-django',
|
name='graphene-django',
|
||||||
version='1.2.1',
|
version='1.2.1',
|
||||||
|
@ -41,14 +51,10 @@ setup(
|
||||||
setup_requires=[
|
setup_requires=[
|
||||||
'pytest-runner',
|
'pytest-runner',
|
||||||
],
|
],
|
||||||
tests_require=[
|
tests_require=tests_require,
|
||||||
'django-filter>=1.0.0',
|
extras_require={
|
||||||
'pytest',
|
'test': tests_require,
|
||||||
'pytest-django==2.9.1',
|
},
|
||||||
'mock',
|
|
||||||
# Required for Django postgres fields testing
|
|
||||||
'psycopg2',
|
|
||||||
],
|
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
platforms='any',
|
platforms='any',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user