File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed
src/betterproto/templates Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 22# sources: {{ ', '.join(output_file.input_filenames) }}
33# plugin: python-betterproto
44# This file has been @generated
5+
6+ __all__ = (
7+ {% - for enum in output_file .enums -%}
8+ "{{ enum.py_name }}",
9+ {% - endfor -%}
10+ {% - for message in output_file .messages -%}
11+ "{{ message.py_name }}",
12+ {% - endfor -%}
13+ {% - for service in output_file .services -%}
14+ "{{ service.py_name }}Stub",
15+ "{{ service.py_name }}Base",
16+ {% - endfor -%}
17+ )
18+
519{% for i in output_file .python_module_imports |sort %}
620import {{ i }}
721{% endfor %}
Original file line number Diff line number Diff line change 1+ def test_all_definition ():
2+ """
3+ Check that a compiled module defines __all__ with the right value.
4+
5+ These modules have been chosen since they contain messages, services and enums.
6+ """
7+ import tests .output_betterproto .enum as enum
8+ import tests .output_betterproto .service as service
9+
10+ assert service .__all__ == (
11+ "ThingType" ,
12+ "DoThingRequest" ,
13+ "DoThingResponse" ,
14+ "GetThingRequest" ,
15+ "GetThingResponse" ,
16+ "TestStub" ,
17+ "TestBase" ,
18+ )
19+ assert enum .__all__ == ("Choice" , "ArithmeticOperator" , "Test" )
You can’t perform that action at this time.
0 commit comments