From aa935089e0698a5841cea0694e5294a832c5bb46 Mon Sep 17 00:00:00 2001 From: abawchen Date: Fri, 13 Mar 2020 17:25:50 +0800 Subject: [PATCH 1/3] refactor(test): introduce conftest.py --- .gitignore | 1 + graphene_mongo/tests/{setup.py => conftest.py} | 0 graphene_mongo/tests/test_fields.py | 1 - graphene_mongo/tests/test_mutation.py | 1 - graphene_mongo/tests/test_query.py | 1 - graphene_mongo/tests/test_relay_query.py | 3 --- setup.cfg | 6 +----- 7 files changed, 2 insertions(+), 11 deletions(-) rename graphene_mongo/tests/{setup.py => conftest.py} (100%) diff --git a/.gitignore b/.gitignore index fcace0da..636223d4 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ _build/ build/ dist/ graphene_mongo.egg-info/ +htmlcov/ *.pyc *.swo *.swp diff --git a/graphene_mongo/tests/setup.py b/graphene_mongo/tests/conftest.py similarity index 100% rename from graphene_mongo/tests/setup.py rename to graphene_mongo/tests/conftest.py diff --git a/graphene_mongo/tests/test_fields.py b/graphene_mongo/tests/test_fields.py index 2453f298..160a74d8 100644 --- a/graphene_mongo/tests/test_fields.py +++ b/graphene_mongo/tests/test_fields.py @@ -1,5 +1,4 @@ from . import nodes -from .setup import fixtures from ..fields import MongoengineConnectionField diff --git a/graphene_mongo/tests/test_mutation.py b/graphene_mongo/tests/test_mutation.py index 2be8c864..78eb5f06 100644 --- a/graphene_mongo/tests/test_mutation.py +++ b/graphene_mongo/tests/test_mutation.py @@ -2,7 +2,6 @@ from graphene.relay import Node -from .setup import fixtures from .models import Article, Editor from .nodes import ArticleNode, EditorNode diff --git a/graphene_mongo/tests/test_query.py b/graphene_mongo/tests/test_query.py index 5dd62cca..872869a0 100644 --- a/graphene_mongo/tests/test_query.py +++ b/graphene_mongo/tests/test_query.py @@ -5,7 +5,6 @@ from . import models from . import types -from .setup import fixtures, fixtures_dirname def test_should_query_editor(fixtures, fixtures_dirname): diff --git a/graphene_mongo/tests/test_relay_query.py b/graphene_mongo/tests/test_relay_query.py index 825fcdfc..0ccc4d4a 100644 --- a/graphene_mongo/tests/test_relay_query.py +++ b/graphene_mongo/tests/test_relay_query.py @@ -1,6 +1,5 @@ import os import json -import pytest import base64 import graphene @@ -8,8 +7,6 @@ from . import models from . import nodes -from . import types -from .setup import fixtures, fixtures_dirname from ..fields import MongoengineConnectionField from ..types import MongoengineObjectType diff --git a/setup.cfg b/setup.cfg index 1a477837..f934b7e8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -4,11 +4,7 @@ description-file = README.md [flake8] exclude = setup.py,docs/*,examples/* max-line-length = 130 -per-file-ignores = - graphene_mongo/tests/test_mutation.py: F401, F811 - graphene_mongo/tests/test_query.py: F401, F811 - graphene_mongo/tests/test_relay_query.py: F401, F811 - graphene_mongo/tests/test_fields.py: F401, F811 + [coverage:run] omit = */tests/* From a5ccac7a774f2e3f4085b800bb1264dd7f2b98ae Mon Sep 17 00:00:00 2001 From: abawchen Date: Fri, 13 Mar 2020 17:31:16 +0800 Subject: [PATCH 2/3] feat: support python 3.8 --- requirements.txt | 2 +- setup.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ae1966c9..1c9d02e7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ coveralls==1.2.0 -flake8==3.5.0 +flake8==3.7.9 flake8-per-file-ignores==0.6 future==0.17.1 graphene>=2.1.3,<3 diff --git a/setup.py b/setup.py index 491b100c..5217d026 100644 --- a/setup.py +++ b/setup.py @@ -17,6 +17,7 @@ "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.8", "Programming Language :: Python :: Implementation :: PyPy", "License :: OSI Approved :: MIT License", ], From d308ce3bb69a64c86aa4d539dda2af5b70eac18e Mon Sep 17 00:00:00 2001 From: abawchen Date: Fri, 13 Mar 2020 17:33:13 +0800 Subject: [PATCH 3/3] chore(ci): add 3.8 to ci --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 714f26bf..72d6825d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ python: - "3.4" - "3.5" - "3.6" + - "3.8" install: pip install -r requirements.txt script: make test