Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick91 committed Jul 14, 2023
1 parent 7f7af4d commit 1ded981
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
PYTHON_VERSIONS = ["3.11", "3.10", "3.9", "3.8", "3.7"]


PYTEST_OPTIONS = [
COMMON_PYTEST_OPTIONS = [
"--cov=strawberry",
"--cov-append",
"--cov-report=xml",
"-n",
"auto",
"--showlocals",
"-vv",
"--ignore=tests/mypy",
"--ignore=tests/pyright",
]

INTEGRATIONS = [
Expand Down Expand Up @@ -41,10 +43,8 @@ def tests(session: Session) -> None:

session.run(
"pytest",
*PYTEST_OPTIONS,
*COMMON_PYTEST_OPTIONS,
*markers,
"--ignore=tests/mypy",
"--ignore=tests/pyright",
# TODO: reintroduce this
"--ignore=tests/cli",
"--ignore=tests/experimental/pydantic",
Expand All @@ -60,7 +60,7 @@ def tests_django(session: Session, django: str) -> None:
session._session.install(f"django~={django}") # type: ignore
session._session.install("pytest-django") # type: ignore

session.run("pytest", *PYTEST_OPTIONS, "-m", "django", "-m", "not aiohttp")
session.run("pytest", *COMMON_PYTEST_OPTIONS, "-m", "django", "-m", "not aiohttp")


@session(python=["3.11"], name="Starlette tests", tags=["tests"])
Expand All @@ -70,7 +70,9 @@ def tests_starlette(session: Session, starlette: str) -> None:

session._session.install(f"starlette=={starlette}") # type: ignore

session.run("pytest", *PYTEST_OPTIONS, "-m", "starlette", "-m", "not aiohttp")
session.run(
"pytest", *COMMON_PYTEST_OPTIONS, "-m", "starlette", "-m", "not aiohttp"
)


@session(python=["3.11"], name="Test integrations", tags=["tests"])
Expand All @@ -96,7 +98,9 @@ def tests_integrations(session: Session, integration: str) -> None:
elif integration == "flask":
session._session.install("pytest-flask") # type: ignore

session.run("pytest", *PYTEST_OPTIONS, "-m", integration, "-m", "not aiohttp")
session.run(
"pytest", *COMMON_PYTEST_OPTIONS, "-m", integration, "-m", "not aiohttp"
)


@session(python=["3.11"], name="Pydantic tests", tags=["tests"])
Expand All @@ -109,7 +113,7 @@ def test_pydantic(session: Session, pydantic: str) -> None:

session.run(
"pytest",
*PYTEST_OPTIONS,
*COMMON_PYTEST_OPTIONS,
"-m",
"pydantic",
)
Expand Down

0 comments on commit 1ded981

Please sign in to comment.