2020
2121CURRENT_DIRECTORY = pathlib .Path (__file__ ).parent .absolute ()
2222
23- TEST_DEPENDENCIES = [
24- "flask" ,
25- "freezegun" ,
26- "mock" ,
27- "oauth2client" ,
28- "pyopenssl" ,
29- "pytest" ,
30- "pytest-cov" ,
31- "pytest-localserver" ,
32- "pyu2f" ,
33- "requests" ,
34- "urllib3" ,
35- "cryptography" ,
36- "responses" ,
37- "grpcio" ,
38- ]
39-
40- ASYNC_DEPENDENCIES = [
41- "pytest-asyncio" ,
42- "aioresponses" ,
43- "asynctest" ,
44- "aiohttp!=3.7.4.post0" ,
45- ]
46-
4723BLACK_VERSION = "black==19.3b0"
4824BLACK_PATHS = [
4925 "google" ,
@@ -91,10 +67,8 @@ def unit(session):
9167 constraints_path = str (
9268 CURRENT_DIRECTORY / "testing" / f"constraints-{ session .python } .txt"
9369 )
94- add_constraints = ["-c" , constraints_path ]
95- session .install (* (TEST_DEPENDENCIES + add_constraints ))
96- session .install (* (ASYNC_DEPENDENCIES + add_constraints ))
97- session .install ("-e" , "." , * add_constraints )
70+ session .install ("-r" , "testing/requirements.txt" , "-c" , constraints_path )
71+ session .install ("-e" , "." , "-c" , constraints_path )
9872 session .run (
9973 "pytest" ,
10074 f"--junitxml=unit_{ session .python } _sponge_log.xml" ,
@@ -109,8 +83,7 @@ def unit(session):
10983
11084@nox .session (python = "3.7" )
11185def cover (session ):
112- session .install (* TEST_DEPENDENCIES )
113- session .install (* (ASYNC_DEPENDENCIES ))
86+ session .install ("-r" , "testing/requirements.txt" )
11487 session .install ("-e" , "." )
11588 session .run (
11689 "pytest" ,
@@ -128,7 +101,7 @@ def cover(session):
128101@nox .session (python = "3.7" )
129102def docgen (session ):
130103 session .env ["SPHINX_APIDOC_OPTIONS" ] = "members,inherited-members,show-inheritance"
131- session .install (* TEST_DEPENDENCIES )
104+ session .install ("-r" , "testing/requirements.txt" )
132105 session .install ("sphinx" )
133106 session .install ("-e" , "." )
134107 session .run ("rm" , "-r" , "docs/reference" )
@@ -168,8 +141,7 @@ def docs(session):
168141
169142@nox .session (python = "pypy" )
170143def pypy (session ):
171- session .install (* TEST_DEPENDENCIES )
172- session .install (* ASYNC_DEPENDENCIES )
144+ session .install ("-r" , "test/requirements.txt" )
173145 session .install ("-e" , "." )
174146 session .run (
175147 "pytest" ,
0 commit comments