Skip to content

Reorganize Tests #985

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions graphene/types/base.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
from typing import Type

from ..utils.subclass_with_meta import SubclassWithMeta
from ..utils.trim_docstring import trim_docstring
import six

if six.PY3:
from typing import Type


class BaseOptions(object):
Expand Down
5 changes: 2 additions & 3 deletions graphene/types/scalars.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import six
from typing import Any

from graphql.language.ast import BooleanValue, FloatValue, IntValue, StringValue

from .base import BaseOptions, BaseType
from .unmountedtype import UnmountedType

if six.PY3:
from typing import Any


class ScalarOptions(BaseOptions):
pass
Expand Down
5 changes: 0 additions & 5 deletions graphene/types/tests/test_enum.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import six

from ..argument import Argument
from ..enum import Enum, PyEnum
from ..field import Field
Expand Down Expand Up @@ -115,9 +113,6 @@ class Query(ObjectType):


def test_enum_from_python3_enum_uses_enum_doc():
if not six.PY3:
return

from enum import Enum as PyEnum

class Color(PyEnum):
Expand Down
14 changes: 14 additions & 0 deletions graphene/types/tests/test_objecttype.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,3 +265,17 @@ class Meta:
field = MyScalar()

assert str(MyObjectType) == "MyObjectType"


def test_objecttype_meta_with_annotations():
class Query(ObjectType):
class Meta:
name: str = "oops"

hello = String()

def resolve_hello(self, info):
return "Hello"

schema = Schema(query=Query)
assert schema is not None
35 changes: 0 additions & 35 deletions graphene/utils/annotate.py

This file was deleted.

37 changes: 0 additions & 37 deletions graphene/utils/tests/test_annotate.py

This file was deleted.

15 changes: 0 additions & 15 deletions tests_py36/test_objecttype.py

This file was deleted.

2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ deps =
setenv =
PYTHONPATH = .:{envdir}
commands =
py{36,37}: py.test --cov=graphene graphene examples tests_asyncio tests_py36 {posargs}
py{36,37}: py.test --cov=graphene graphene examples tests_asyncio {posargs}

[testenv:pre-commit]
basepython=python3.6
Expand Down