Skip to content

Commit

Permalink
Remove generator_test_wrapper for python's generator_test.
Browse files Browse the repository at this point in the history
The test wrappers were another way to document nonconformant behaviour between
different python backends. We can achieve the same by removing the wrapper
script and adding an if-condition in the test itself based on
api_implementation.Type(). Since we already do that for nonconformance between
pure Python vs. C++ backends, this change makes it easier to look for UPB
nonconformance instead of going through another layer of indirection.

Temporarily, we will need to hardcode the migrated test name in test_upb.yml
because not all tests under google.protobuf.internal support UPB yet.
(UPB testing for selected tests are added in 21e9aa6).

PiperOrigin-RevId: 712672890
  • Loading branch information
tonyliaoss authored and copybara-github committed Jan 6, 2025
1 parent d406cae commit 1ff30f9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 38 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_upb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ jobs:
# We will eventually make this into a wildcard rule once all tests
# have been migrated to be compatible with upb.
run: |
TESTS=(message_test message_factory_test descriptor_test proto_builder_test descriptor_pool_test)
TESTS=(message_test message_factory_test descriptor_test proto_builder_test descriptor_pool_test generator_test)
for test in ${TESTS[@]}; do
python -m unittest -v google.protobuf.internal.${test}
done
Expand Down
2 changes: 0 additions & 2 deletions python/pb_unit_tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ package(default_applicable_licenses = ["//:license"])

licenses(["notice"])

pyproto_test_wrapper(name = "generator_test")

pyproto_test_wrapper(name = "reflection_test")

filegroup(
Expand Down
35 changes: 0 additions & 35 deletions python/pb_unit_tests/generator_test_wrapper.py

This file was deleted.

0 comments on commit 1ff30f9

Please sign in to comment.