Added caching to travis tests

This commit is contained in:
Syrus Akbary 2015-10-28 01:30:39 -07:00
parent e82c680fd1
commit ee3279e12b
3 changed files with 13 additions and 3 deletions

View File

@ -6,9 +6,10 @@ python:
- 3.4 - 3.4
- 3.5 - 3.5
- pypy - pypy
cache: pip
install: install:
- pip install pytest pytest-cov coveralls flake8 six blinker pytest-django - pip install --cache-dir $HOME/.cache/pip pytest pytest-cov coveralls flake8 six blinker pytest-django
- pip install -e .[django] - pip install --cache-dir $HOME/.cache/pip -e .[django]
- python setup.py develop - python setup.py develop
script: script:
- py.test --cov=graphene - py.test --cov=graphene

10
graphene/utils/misc.py Normal file
View File

@ -0,0 +1,10 @@
from collections import OrderedDict
from graphql.core.type import GraphQLEnumType, GraphQLEnumValue
def enum_to_graphql_enum(enumeration):
return GraphQLEnumType(
name=enumeration.__name__,
values=OrderedDict([(it.name, GraphQLEnumValue(it.value)) for it in enumeration]),
description=enumeration.__doc__
)

View File

@ -1,7 +1,6 @@
SECRET_KEY = 1 SECRET_KEY = 1
INSTALLED_APPS = [ INSTALLED_APPS = [
'graphene.contrib.django',
'examples.starwars_django', 'examples.starwars_django',
'tests.contrib_django', 'tests.contrib_django',
] ]