diff --git a/synthtool/gcp/common.py b/synthtool/gcp/common.py index c21fbc493..9181e375e 100644 --- a/synthtool/gcp/common.py +++ b/synthtool/gcp/common.py @@ -76,11 +76,20 @@ def py_library(self, **kwargs) -> Path: # Set default Python versions for noxfile.py if "default_python_version" not in kwargs: - kwargs["default_python_version"] = "3.7" + kwargs["default_python_version"] = "3.8" if "unit_test_python_versions" not in kwargs: - kwargs["unit_test_python_versions"] = ["2.7", "3.5", "3.6", "3.7", "3.8"] + kwargs["unit_test_python_versions"] = ["3.6", "3.7", "3.8"] + if "microgenerator" not in kwargs: + kwargs["unit_test_python_versions"] = ["2.7", "3.5"] + kwargs[ + "unit_test_python_versions" + ] + if "system_test_python_versions" not in kwargs: - kwargs["system_test_python_versions"] = ["2.7", "3.7"] + kwargs["system_test_python_versions"] = ["3.8"] + if "microgenerator" not in kwargs: + kwargs["system_test_python_versions"] = ["2.7"] + kwargs[ + "system_test_python_versions" + ] # Don't add samples templates if there are no samples if "samples" not in kwargs: diff --git a/synthtool/gcp/templates/python_library/noxfile.py.j2 b/synthtool/gcp/templates/python_library/noxfile.py.j2 index 46657f29b..852bc7547 100644 --- a/synthtool/gcp/templates/python_library/noxfile.py.j2 +++ b/synthtool/gcp/templates/python_library/noxfile.py.j2 @@ -72,6 +72,10 @@ def lint_setup_py(session): def default(session): # Install all test dependencies, then install this package in-place. + + {%- if microgenerator %} + session.install("asyncmock", "pytest-asyncio") + {% endif -%} session.install("mock", "pytest", "pytest-cov") session.install("-e", "."){% for dependency in unit_test_dependencies %} session.install("-e", "{{dependency}}"){% endfor %}