Skip to content

Commit ee3279e

Browse files
committed
Added caching to travis tests
1 parent e82c680 commit ee3279e

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ python:
66
- 3.4
77
- 3.5
88
- pypy
9+
cache: pip
910
install:
10-
- pip install pytest pytest-cov coveralls flake8 six blinker pytest-django
11-
- pip install -e .[django]
11+
- pip install --cache-dir $HOME/.cache/pip pytest pytest-cov coveralls flake8 six blinker pytest-django
12+
- pip install --cache-dir $HOME/.cache/pip -e .[django]
1213
- python setup.py develop
1314
script:
1415
- py.test --cov=graphene

graphene/utils/misc.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from collections import OrderedDict
2+
from graphql.core.type import GraphQLEnumType, GraphQLEnumValue
3+
4+
5+
def enum_to_graphql_enum(enumeration):
6+
return GraphQLEnumType(
7+
name=enumeration.__name__,
8+
values=OrderedDict([(it.name, GraphQLEnumValue(it.value)) for it in enumeration]),
9+
description=enumeration.__doc__
10+
)

tests/django_settings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
SECRET_KEY = 1
22

33
INSTALLED_APPS = [
4-
'graphene.contrib.django',
54
'examples.starwars_django',
65
'tests.contrib_django',
76
]

0 commit comments

Comments
 (0)