Skip to content

Commit

Permalink
Added test extra requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Feb 8, 2017
1 parent 8f373cc commit 256c84a
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 13 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Expand Up @@ -22,8 +22,7 @@ before_install:
install:
- |
if [ "$TEST_TYPE" = build ]; then
pip install pytest pytest-cov pytest-benchmark coveralls six pytz iso8601
pip install -e .
pip install -e .[test]
python setup.py develop
elif [ "$TEST_TYPE" = lint ]; then
pip install flake8
Expand Down
10 changes: 8 additions & 2 deletions README.md
Expand Up @@ -75,13 +75,19 @@ If you want to learn even more, you can also check the following [examples](exam
After cloning this repo, ensure dependencies are installed by running:

```sh
python setup.py install
pip install .[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 --cov=graphene --benchmark-skip # Use -v -s for verbose mode
```

You can also run the benchmarks with:

```sh
py.test graphene --benchmark-only
```


Expand Down
10 changes: 8 additions & 2 deletions README.rst
Expand Up @@ -89,13 +89,19 @@ After cloning this repo, ensure dependencies are installed by running:

.. code:: sh
python setup.py install
pip install .[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 --cov=graphene --benchmark-skip # Use -v -s for verbose mode
You can also run the benchmarks with:

.. code:: sh
py.test graphene --benchmark-only
Documentation
~~~~~~~~~~~~~
Expand Down
20 changes: 13 additions & 7 deletions setup.py
Expand Up @@ -37,6 +37,17 @@ def run_tests(self):
errno = pytest.main(self.pytest_args)
sys.exit(errno)

tests_require = [
'pytest>=2.7.2',
'pytest-benchmark',
'pytest-cov',
'coveralls',
'six',
'mock',
'pytz',
'iso8601',
]

setup(
name='graphene',
version=version,
Expand Down Expand Up @@ -74,14 +85,9 @@ def run_tests(self):
'graphql-relay>=0.4.5',
'promise>=1.0.1',
],
tests_require=[
'pytest>=2.7.2',
'pytest-benchmark',
'mock',
'pytz',
'iso8601',
],
tests_require=tests_require,
extras_require={
'test': tests_require,
'django': [
'graphene-django',
],
Expand Down

0 comments on commit 256c84a

Please sign in to comment.