From c758c2985fa4fb9d84840dccca423be4eeeb5158 Mon Sep 17 00:00:00 2001 From: Raphael Long Date: Thu, 16 Jul 2020 19:54:50 -0500 Subject: [PATCH] refactor: remove async unit test nox session (#112) * refactor: remove async unit test nox session * refactor: remove async unit test directory * fix: noxfile unit test imports and arglist --- noxfile.py | 15 +++------------ tests/unit/v1/async/__init__.py | 13 ------------- tests/unit/v1/{async => }/test_async_batch.py | 0 tests/unit/v1/{async => }/test_async_client.py | 0 .../unit/v1/{async => }/test_async_collection.py | 0 tests/unit/v1/{async => }/test_async_document.py | 0 tests/unit/v1/{async => }/test_async_query.py | 0 .../unit/v1/{async => }/test_async_transaction.py | 0 8 files changed, 3 insertions(+), 25 deletions(-) delete mode 100644 tests/unit/v1/async/__init__.py rename tests/unit/v1/{async => }/test_async_batch.py (100%) rename tests/unit/v1/{async => }/test_async_client.py (100%) rename tests/unit/v1/{async => }/test_async_collection.py (100%) rename tests/unit/v1/{async => }/test_async_document.py (100%) rename tests/unit/v1/{async => }/test_async_query.py (100%) rename tests/unit/v1/{async => }/test_async_transaction.py (100%) diff --git a/noxfile.py b/noxfile.py index 600ee8338..d6a9e172a 100644 --- a/noxfile.py +++ b/noxfile.py @@ -68,9 +68,9 @@ def lint_setup_py(session): session.run("python", "setup.py", "check", "--restructuredtext", "--strict") -def default(session, test_dir, ignore_dir): +def default(session, test_dir, ignore_dir=None): # Install all test dependencies, then install this package in-place. - session.install("asyncmock", "pytest-asyncio") + session.install("asyncmock", "pytest-asyncio", "aiounittest") session.install("mock", "pytest", "pytest-cov") session.install("-e", ".") @@ -99,19 +99,10 @@ def default(session, test_dir, ignore_dir): def unit(session): """Run the unit test suite for sync tests.""" default( - session, - os.path.join("tests", "unit"), - os.path.join("tests", "unit", "v1", "async"), + session, os.path.join("tests", "unit"), ) -@nox.session(python=["3.6", "3.7", "3.8"]) -def unit_async(session): - """Run the unit test suite for async tests.""" - session.install("pytest-asyncio", "aiounittest") - default(session, os.path.join("tests", "unit", "v1", "async"), None) - - @nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS) def system(session): """Run the system test suite.""" diff --git a/tests/unit/v1/async/__init__.py b/tests/unit/v1/async/__init__.py deleted file mode 100644 index c6334245a..000000000 --- a/tests/unit/v1/async/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/tests/unit/v1/async/test_async_batch.py b/tests/unit/v1/test_async_batch.py similarity index 100% rename from tests/unit/v1/async/test_async_batch.py rename to tests/unit/v1/test_async_batch.py diff --git a/tests/unit/v1/async/test_async_client.py b/tests/unit/v1/test_async_client.py similarity index 100% rename from tests/unit/v1/async/test_async_client.py rename to tests/unit/v1/test_async_client.py diff --git a/tests/unit/v1/async/test_async_collection.py b/tests/unit/v1/test_async_collection.py similarity index 100% rename from tests/unit/v1/async/test_async_collection.py rename to tests/unit/v1/test_async_collection.py diff --git a/tests/unit/v1/async/test_async_document.py b/tests/unit/v1/test_async_document.py similarity index 100% rename from tests/unit/v1/async/test_async_document.py rename to tests/unit/v1/test_async_document.py diff --git a/tests/unit/v1/async/test_async_query.py b/tests/unit/v1/test_async_query.py similarity index 100% rename from tests/unit/v1/async/test_async_query.py rename to tests/unit/v1/test_async_query.py diff --git a/tests/unit/v1/async/test_async_transaction.py b/tests/unit/v1/test_async_transaction.py similarity index 100% rename from tests/unit/v1/async/test_async_transaction.py rename to tests/unit/v1/test_async_transaction.py