@@ -230,6 +230,7 @@ def unit(session, protobuf_implementation):
230230 CURRENT_DIRECTORY / "testing" / f"constraints-{ session .python } .txt"
231231 )
232232 install_unittest_dependencies (session , "-c" , constraints_path )
233+ session .install ("pytest-xdist" )
233234
234235 # TODO(https://github.com/googleapis/synthtool/issues/1976):
235236 # Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
@@ -240,6 +241,8 @@ def unit(session, protobuf_implementation):
240241 # Run py.test against the unit tests.
241242 args = [
242243 "py.test" ,
244+ "-n" ,
245+ "auto" ,
243246 "-s" ,
244247 f"--junitxml=unit_{ session .python } _sponge_log.xml" ,
245248 "--cov=google" ,
@@ -753,6 +756,7 @@ def prerelease_deps(session, protobuf_implementation, database_dialect):
753756@nox .session (python = ALL_PYTHON )
754757def mypy (session ):
755758 """Run the type checker."""
759+ session .skip ("Mypy is not yet supported" )
756760 # TODO(https://github.com/googleapis/gapic-generator-python/issues/2579):
757761 # use the latest version of mypy
758762 session .install (
@@ -830,12 +834,15 @@ def core_deps_from_source(session, protobuf_implementation):
830834 dep_paths = [str (deps_dir / dep ) for dep in core_dependencies_from_source ]
831835
832836 session .install (* dep_paths , "--no-deps" , "--ignore-installed" )
837+ session .install ("pytest-xdist" )
833838 print (
834839 f"Installed { ', ' .join (core_dependencies_from_source )} locally from { deps_dir } "
835840 )
836841
837842 session .run (
838843 "py.test" ,
844+ "-n" ,
845+ "auto" ,
839846 "tests/unit" ,
840847 env = {
841848 "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION" : protobuf_implementation ,
0 commit comments