@@ -132,14 +132,14 @@ MYPY_PROTOBUF_VENV=venv_$PY_VER_MYPY_PROTOBUF
132132 find proto/testproto/grpc -name " *.proto" -print0 | xargs -0 " $PROTOC " " ${PROTOC_ARGS[@]} " --mypy_grpc_out=test/generated
133133
134134 # Generate with concrete service stubs for testing
135- find proto -name " *.proto" -print0 | xargs -0 " $PROTOC " " ${PROTOC_ARGS[@]} " --mypy_out=generate_concrete_servicer_stubs:test/generated-concrete
136- find proto/testproto/grpc -name " *.proto" -print0 | xargs -0 " $PROTOC " " ${PROTOC_ARGS[@]} " --mypy_grpc_out=generate_concrete_servicer_stubs:test/generated-concrete
135+ find proto -name " *.proto" -print0 | xargs -0 " $PROTOC " " ${PROTOC_ARGS[@]} " --mypy_out=generate_concrete_servicer_stubs:test/generated_concrete
136+ find proto/testproto/grpc -name " *.proto" -print0 | xargs -0 " $PROTOC " " ${PROTOC_ARGS[@]} " --mypy_grpc_out=generate_concrete_servicer_stubs:test/generated_concrete
137137
138138 # Generate with sync_only stubs for testing
139- find proto/testproto/grpc -name " *.proto" -print0 | xargs -0 " $PROTOC " " ${PROTOC_ARGS[@]} " --mypy_grpc_out=only_sync:test/generated-sync-only
139+ find proto/testproto/grpc -name " *.proto" -print0 | xargs -0 " $PROTOC " " ${PROTOC_ARGS[@]} " --mypy_grpc_out=only_sync:test/generated_sync_only --mypy_out=test/generated_sync_only --python_out=test/generated_sync_only
140140
141141 # Generate with async_only stubs for testing
142- find proto/testproto/grpc -name " *.proto" -print0 | xargs -0 " $PROTOC " " ${PROTOC_ARGS[@]} " --mypy_grpc_out=only_async:test/generated-async-only
142+ find proto/testproto/grpc -name " *.proto" -print0 | xargs -0 " $PROTOC " " ${PROTOC_ARGS[@]} " --mypy_grpc_out=only_async:test/generated_async_only --mypy_out=test/generated_async_only --python_out=test/generated_async_only
143143
144144 if [[ -n $VALIDATE ]] && ! diff <( echo " $SHA_BEFORE " ) <( find test/generated -name " *.pyi" -print0 | xargs -0 sha1sum) ; then
145145 echo -e " ${RED} Some .pyi files did not match. Please commit those files${NC} "
@@ -157,22 +157,24 @@ for PY_VER in $PY_VER_UNIT_TESTS; do
157157 (
158158 source " $UNIT_TESTS_VENV " /bin/activate
159159 find proto/testproto/grpc -name " *.proto" -print0 | xargs -0 python -m grpc_tools.protoc " ${PROTOC_ARGS[@]} " --grpc_python_out=test/generated
160+ find proto/testproto/grpc -name " *.proto" -print0 | xargs -0 python -m grpc_tools.protoc " ${PROTOC_ARGS[@]} " --grpc_python_out=test/generated_sync_only
161+ find proto/testproto/grpc -name " *.proto" -print0 | xargs -0 python -m grpc_tools.protoc " ${PROTOC_ARGS[@]} " --grpc_python_out=test/generated_async_only
160162 )
161163
162164 # Run mypy on unit tests / generated output
163165 (
164166 source " $MYPY_VENV " /bin/activate
165167 # Run concrete mypy
166168 CONCRETE_MODULES=( -m test.test_concrete )
167- MYPYPATH=$MYPYPATH :test/generated-concrete mypy ${CUSTOM_TYPESHED_DIR_ARG: +" $CUSTOM_TYPESHED_DIR_ARG " } --python-executable=" $UNIT_TESTS_VENV " /bin/python --python-version=" $PY_VER_MYPY_TARGET " " ${CONCRETE_MODULES[@]} "
169+ MYPYPATH=$MYPYPATH :test/generated_concrete mypy ${CUSTOM_TYPESHED_DIR_ARG: +" $CUSTOM_TYPESHED_DIR_ARG " } --python-executable=" $UNIT_TESTS_VENV " /bin/python --python-version=" $PY_VER_MYPY_TARGET " " ${CONCRETE_MODULES[@]} "
168170
169171 # Run sync_only mypy
170- SYNC_ONLY_MODULES=( -m test.test_sync_only )
171- MYPYPATH=$MYPYPATH :test/generated-sync-only mypy ${CUSTOM_TYPESHED_DIR_ARG: +" $CUSTOM_TYPESHED_DIR_ARG " } --python-executable=" $UNIT_TESTS_VENV " /bin/python --python-version=" $PY_VER_MYPY_TARGET " " ${SYNC_ONLY_MODULES[@]} "
172+ SYNC_ONLY_MODULES=( -m test.sync_only. test_sync_only )
173+ MYPYPATH=$MYPYPATH :test/generated_sync_only mypy ${CUSTOM_TYPESHED_DIR_ARG: +" $CUSTOM_TYPESHED_DIR_ARG " } --python-executable=" $UNIT_TESTS_VENV " /bin/python --python-version=" $PY_VER_MYPY_TARGET " " ${SYNC_ONLY_MODULES[@]} "
172174
173175 # Run async_only mypy
174- ASYNC_ONLY_MODULES=( -m test.test_async_only )
175- MYPYPATH=$MYPYPATH :test/generated-async-only mypy ${CUSTOM_TYPESHED_DIR_ARG: +" $CUSTOM_TYPESHED_DIR_ARG " } --python-executable=" $UNIT_TESTS_VENV " /bin/python --python-version=" $PY_VER_MYPY_TARGET " " ${ASYNC_ONLY_MODULES[@]} "
176+ ASYNC_ONLY_MODULES=( -m test.async_only. test_async_only )
177+ MYPYPATH=$MYPYPATH :test/generated_async_only mypy ${CUSTOM_TYPESHED_DIR_ARG: +" $CUSTOM_TYPESHED_DIR_ARG " } --python-executable=" $UNIT_TESTS_VENV " /bin/python --python-version=" $PY_VER_MYPY_TARGET " " ${ASYNC_ONLY_MODULES[@]} "
176178
177179 export MYPYPATH=$MYPYPATH :test/generated
178180
@@ -222,7 +224,7 @@ for PY_VER in $PY_VER_UNIT_TESTS; do
222224 (
223225 # Run unit tests.
224226 source " $UNIT_TESTS_VENV " /bin/activate
225- PYTHONPATH=test/generated py.test --ignore=test/generated --ignore=test/generated-sync-only --ignore=test/generated-async-only -v
227+ PYTHONPATH=test/generated py.test --ignore=test/generated --ignore=test/generated_sync_only --ignore=test/generated_async_only -v
226228 )
227229done
228230
0 commit comments