aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBu Sun Kim <8822365+busunkim96@users.noreply.github.com>2021-10-15 11:26:39 -0600
committerGitHub <noreply@github.com>2021-10-15 10:26:39 -0700
commita4cf9b1bf461a3fb35432e42f4d8bc1a8ff7bc97 (patch)
treec5754164aa0a0149e9bd5260ee69aef3f4e2d80e
parent3a95b4ee70b54fe42e578d5a5d3502cbec8269c9 (diff)
downloadgoogle-auth-library-python-a4cf9b1bf461a3fb35432e42f4d8bc1a8ff7bc97.tar.gz
test: list unit test dependencies in requirements.txt file (#888)
* test: list unit test reqs in requirements.txt file * chore: update authorized_user.json
-rw-r--r--noxfile.py38
-rw-r--r--system_tests/secrets.tar.encbin10323 -> 10323 bytes
-rw-r--r--testing/requirements.txt20
3 files changed, 25 insertions, 33 deletions
diff --git a/noxfile.py b/noxfile.py
index 2e6e889..e238c97 100644
--- a/noxfile.py
+++ b/noxfile.py
@@ -20,30 +20,6 @@ import nox
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
-TEST_DEPENDENCIES = [
- "flask",
- "freezegun",
- "mock",
- "oauth2client",
- "pyopenssl",
- "pytest",
- "pytest-cov",
- "pytest-localserver",
- "pyu2f",
- "requests",
- "urllib3",
- "cryptography",
- "responses",
- "grpcio",
-]
-
-ASYNC_DEPENDENCIES = [
- "pytest-asyncio",
- "aioresponses",
- "asynctest",
- "aiohttp!=3.7.4.post0",
-]
-
BLACK_VERSION = "black==19.3b0"
BLACK_PATHS = [
"google",
@@ -91,10 +67,8 @@ def unit(session):
constraints_path = str(
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
)
- add_constraints = ["-c", constraints_path]
- session.install(*(TEST_DEPENDENCIES + add_constraints))
- session.install(*(ASYNC_DEPENDENCIES + add_constraints))
- session.install("-e", ".", *add_constraints)
+ session.install("-r", "testing/requirements.txt", "-c", constraints_path)
+ session.install("-e", ".", "-c", constraints_path)
session.run(
"pytest",
f"--junitxml=unit_{session.python}_sponge_log.xml",
@@ -109,8 +83,7 @@ def unit(session):
@nox.session(python="3.7")
def cover(session):
- session.install(*TEST_DEPENDENCIES)
- session.install(*(ASYNC_DEPENDENCIES))
+ session.install("-r", "testing/requirements.txt")
session.install("-e", ".")
session.run(
"pytest",
@@ -128,7 +101,7 @@ def cover(session):
@nox.session(python="3.7")
def docgen(session):
session.env["SPHINX_APIDOC_OPTIONS"] = "members,inherited-members,show-inheritance"
- session.install(*TEST_DEPENDENCIES)
+ session.install("-r", "testing/requirements.txt")
session.install("sphinx")
session.install("-e", ".")
session.run("rm", "-r", "docs/reference")
@@ -168,8 +141,7 @@ def docs(session):
@nox.session(python="pypy")
def pypy(session):
- session.install(*TEST_DEPENDENCIES)
- session.install(*ASYNC_DEPENDENCIES)
+ session.install("-r", "test/requirements.txt")
session.install("-e", ".")
session.run(
"pytest",
diff --git a/system_tests/secrets.tar.enc b/system_tests/secrets.tar.enc
index 66c8ff4..646bb23 100644
--- a/system_tests/secrets.tar.enc
+++ b/system_tests/secrets.tar.enc
Binary files differ
diff --git a/testing/requirements.txt b/testing/requirements.txt
new file mode 100644
index 0000000..df20f96
--- /dev/null
+++ b/testing/requirements.txt
@@ -0,0 +1,20 @@
+# Unit test requirements
+flask
+freezegun
+mock
+oauth2client
+pyopenssl
+pytest
+pytest-cov
+pytest-localserver
+pyu2f
+requests
+urllib3
+cryptography
+responses
+grpcio
+# Async Dependencies
+pytest-asyncio; python_version > '3.0'
+aioresponses; python_version > '3.0'
+asynctest; python_version > '3.0'
+aiohttp; python_version > '3.0' \ No newline at end of file