mirror of
https://github.com/graphql-python/graphene.git
synced 2025-09-21 11:22:33 +03:00
Python3 tests no longer need a separate folder
This commit is contained in:
parent
5ed250b5fd
commit
b06f844606
|
@ -265,3 +265,17 @@ def test_abstract_objecttype_can_str():
|
||||||
field = MyScalar()
|
field = MyScalar()
|
||||||
|
|
||||||
assert str(MyObjectType) == "MyObjectType"
|
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
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
from graphene import Schema, ObjectType, String
|
|
||||||
|
|
||||||
|
|
||||||
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
|
|
2
tox.ini
2
tox.ini
|
@ -9,7 +9,7 @@ deps =
|
||||||
setenv =
|
setenv =
|
||||||
PYTHONPATH = .:{envdir}
|
PYTHONPATH = .:{envdir}
|
||||||
commands =
|
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]
|
[testenv:pre-commit]
|
||||||
basepython=python3.6
|
basepython=python3.6
|
||||||
|
|
Loading…
Reference in New Issue
Block a user