Skip to content
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

WIP: AsyncIO integration #22

Closed
wants to merge 20 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add nox support
  • Loading branch information
lidizheng committed Apr 22, 2020
commit fbc7cc27db976f76aaf85a6ae19d34bfa66f24d8
31 changes: 31 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,31 @@ def default(session):
)


def run_asyncio_unit_tests(session):
"""Run AsyncIO unit test session."""

# Install all test dependencies, then install this package in-place.
session.install(
"mock", "pytest",
"git+https://github.com/pytest-dev/pytest-asyncio.git", "asyncmock",
"pytest-cov", "grpcio >= 1.0.2")
session.install("-e", ".")

# Run py.test against the unit tests.
session.run(
"py.test",
"--quiet",
"--cov=google.api_core",
"--cov=tests.asyncio",
"--cov-append",
"--cov-config=.coveragerc",
"--cov-report=",
"--cov-fail-under=0",
os.path.join("tests", "asyncio"),
*session.posargs
)


@nox.session(python=["2.7", "3.5", "3.6", "3.7", "3.8"])
def unit(session):
"""Run the unit test suite."""
Expand All @@ -63,6 +88,12 @@ def unit_grpc_gcp(session):
default(session)


@nox.session(python=["3.6", "3.7", "3.8"])
def unit_asyncio(session):
"""Run the unit test suite."""
run_asyncio_unit_tests(session)


@nox.session(python="3.6")
def lint(session):
"""Run linters.
Expand Down