Commit Graph
100 Commits
Author SHA1 Message Date
boukeversteegh 0c02d1b21a Update with master 2020-07-04 18:54:26 +02:00
boukeversteegh d21cd6e391 black 2020-07-01 13:15:03 +02:00
boukeversteegh af7115429a Expose betterproto.ServiceStub 2020-07-01 12:43:28 +02:00
boukeversteegh 0d9387abec Remove stringcase dependency 2020-07-01 12:43:12 +02:00
boukeversteegh f4ebcb0f65 Merge remote-tracking branch 'daniel/master' into fix/imports
# Conflicts:
#	Pipfile
#	README.md
#	betterproto/__init__.py
#	betterproto/plugin.py
#	betterproto/tests/util.py
2020-07-01 12:19:25 +02:00
boukeversteegh 81711d2427 Avoid naming conflicts when importing multiple types with the same name from an ancestor package 2020-07-01 12:07:59 +02:00
boukeversteegh e3135ce766 Add parameter for non-strict cased output that preserves delimiter count 2020-07-01 09:39:37 +02:00
boukeversteegh 72855227bd Fix import 2020-06-25 15:52:43 +02:00
boukeversteegh 47081617c2 Merge branch 'master' into michael-sayapin/master 2020-06-25 15:02:50 +02:00
boukeversteegh d734206fe5 Rename test-case to keep it close with other enum test 2020-06-24 21:55:31 +02:00
boukeversteegh 0814729c5a Add cases for send() 2020-06-15 18:14:13 +02:00
boukeversteegh f7aa6150e2 Add test-cases for client stream-stream 2020-06-15 18:02:37 +02:00
boukeversteegh 159c30ddd8 Fix close not awaitable, fix done is callable, fix return async next value 2020-06-15 18:02:05 +02:00
boukeversteegh 52eea5ce4c Added missing tests for casing 2020-06-14 23:15:56 +02:00
boukeversteegh fdbe0205f1 find_module docstring and search for init files instead of directories 2020-06-14 22:54:03 +02:00
boukeversteegh e2d672a422 Fix terminology, improve docstrings and add missing asserts to tests 2020-06-14 21:40:12 +02:00
boukeversteegh 63f5191f02 Shorten list selectors 2020-06-14 16:54:34 +02:00
boukeversteegh 87f4b34930 Revert "Support running plugin without installing betterproto"
This reverts commit c88edfd0
2020-06-14 16:52:33 +02:00
boukeversteegh 2c360a55f2 Readability for generating init_files 2020-06-14 16:51:52 +02:00
boukeversteegh 32c8e77274 Recompile Google Protobuf files 2020-06-12 13:56:32 +02:00
boukeversteegh d9fa6d2dd3 Fixes issue where generated Google Protobuf messages imported from betterproto.lib instead of using local forward references 2020-06-12 13:55:55 +02:00
boukeversteegh c88edfd093 Support running plugin without installing betterproto 2020-06-12 13:54:14 +02:00
boukeversteegh 83e13aa606 Fix method name 2020-06-11 13:55:12 +02:00
boukeversteegh 3ca75dadd7 Remove dependency on stringcase, apply black 2020-06-11 13:55:12 +02:00
boukeversteegh 5d2f3a2cd9 Remove fixed test from xfail list #11 2020-06-11 13:55:12 +02:00
boukeversteegh 65c1f366ef Update readme with new output structure and fix example inconsistencies 2020-06-11 13:55:12 +02:00
boukeversteegh 34c34bd15a Add failing test for importing a message from package that looks like a nested type #87 2020-06-11 13:55:12 +02:00
boukeversteegh fb54917f2c Detect entry-point of tests automatically 2020-06-11 13:55:12 +02:00
boukeversteegh 1a95a7988e Ensure uniquely generated import aliases are not name mangled (python.org/dev/peps/pep-0008/#id34) 2020-06-11 13:55:11 +02:00
boukeversteegh 76db2f153e Add import aliases to ancestor imports 2020-06-11 13:55:11 +02:00
boukeversteegh 8567892352 Simplify logic for generating package init files 2020-06-11 13:55:11 +02:00
boukeversteegh 3105e952ea Fixes issue where importing cousin where path has a package with the same name broke import 2020-06-11 13:55:11 +02:00
boukeversteegh 7c8d47de6d Add test cases for cousin imports that break due to aliases starting with two underscores 2020-06-11 13:55:11 +02:00
boukeversteegh c00e2aef19 Break up importing logic in methods 2020-06-11 13:55:11 +02:00
boukeversteegh fdf3b2e764 Compile proto files based on package structure 2020-06-11 13:55:11 +02:00
boukeversteegh f7c2fd1194 Support nested messages, fix casing. Support test-cases in packages. 2020-06-11 13:55:11 +02:00
boukeversteegh d8abb850f8 Update tests to reflect new generated package structure 2020-06-11 13:55:11 +02:00
boukeversteegh d7ba27de2b fix all broken imports 2020-06-11 13:55:11 +02:00
boukeversteegh 57523a9e7f Implement importing unrelated package 2020-06-11 13:55:11 +02:00
boukeversteegh e5e61c873c Implement some import scenarios 2020-06-11 13:55:11 +02:00
boukeversteegh 9fd1c058e6 Create unit tests for importing 2020-06-11 13:55:11 +02:00
boukeversteegh d336153845 Use never expiring invitation link 2020-06-11 13:49:53 +02:00
boukeversteegh f7769a19d1 Pass betterproto option using custom_opt instead of environment variable 2020-06-06 12:51:37 +02:00
boukeversteegh d31f90be6b Combine circular imports 2020-06-04 00:11:22 +02:00
boukeversteegh 919b0a6a7d Check if betterproto has wrapper support in idiomatic way 2020-06-04 00:02:28 +02:00
boukeversteegh 7ecf3fe0e6 Add comment to explain unusual import location 2020-06-04 00:02:28 +02:00
boukeversteegh 973d68a154 Add missing field to MockChannel to prevent warnings while testing 2020-06-04 00:02:28 +02:00
boukeversteegh ab9857b5fd Add test-case for service that returns google protobuf values 2020-06-04 00:02:28 +02:00
boukeversteegh 2f658df666 Use betterproto wrapper classes, extract to module for testability 2020-06-04 00:02:28 +02:00
boukeversteegh b813d1cedb Undo adding skip to test 2020-06-03 23:59:10 +02:00
boukeversteegh f5ce1b7108 Check that config.xfail contains valid test case names 2020-06-03 23:59:10 +02:00
boukeversteegh 62fc421d60 Add failing tests for google.protobuf Struct and Value #9 2020-06-03 23:59:10 +02:00
boukeversteegh eeed1c0db7 Extend pre-compiled Duration and Timestamp instead of manual definition 2020-06-03 23:58:47 +02:00
boukeversteegh 2a3e1e1827 Add basic support for all google.protobuf types 2020-06-03 23:58:47 +02:00
boukeversteegh 53ce1255d3 Do not unwrap google.protobuf.Value and unsupported wrapper types 2020-06-03 23:58:47 +02:00
boukeversteegh e8991339e9 Use pre-compiled wrapper-classes 2020-06-03 23:54:43 +02:00
boukeversteegh 4556d67503 Include pre-compiled google protobuf classes 2020-06-03 23:54:43 +02:00
boukeversteegh f087c6c9bd Support compiling google protobuf files 2020-06-03 23:54:43 +02:00
boukeversteegh b354aeb692 Add dict to list of built-types for #53 2020-05-26 10:09:58 +02:00
boukeversteegh 6d9e3fc580 Add issue references to failing test cases 2020-05-25 23:43:01 +02:00
boukeversteegh 72de590651 Remove unused proto file 2020-05-25 23:36:09 +02:00
boukeversteegh 3c70f21074 #70 Messages should allow fields that are Python keywords 2020-05-25 23:36:08 +02:00
boukeversteegh 4b7d5d3de4 #53 Crash when field has the same name as a system type 2020-05-25 22:23:39 +02:00
boukeversteegh 142e976c40 Add extra related test cases for #11 2020-05-25 21:56:03 +02:00
boukeversteegh 382fabb96c #11 ALL_CAPS message fields are parsed incorrectly 2020-05-25 21:50:30 +02:00
boukeversteegh 18598e77d4 Remove renamed service from test input config 2020-05-25 21:38:14 +02:00
boukeversteegh 6871053ab2 #9 Import bug - returning well known type Empty from service 2020-05-25 21:21:33 +02:00
boukeversteegh 5bb6931df7 #25 Two packages with the same name suffix should not cause naming conflict 2020-05-25 21:15:39 +02:00
boukeversteegh e8a9960b73 Move configuration of test-cases to config file, include list of service tests 2020-05-25 21:11:33 +02:00
boukeversteegh f25c66777a #68 Service input messages are not imported 2020-05-25 18:48:42 +02:00
boukeversteegh 33964b883e Do not use mutable defaults 2020-05-25 00:35:43 +02:00
boukeversteegh ec7574086d Add xfail test-case to for future circular dependency scenario 2020-05-24 20:35:10 +02:00
boukeversteegh 8a42027bc9 Improve failing test-case for issue #64 2020-05-24 20:33:48 +02:00
boukeversteegh 71737cf696 Test case for issue #63 2020-05-24 20:29:32 +02:00
boukeversteegh 659ddd9c44 Working test case for oneof 2020-05-24 20:29:19 +02:00
boukeversteegh 5b6997870a Test case for issue #61 2020-05-24 20:27:12 +02:00
boukeversteegh cdf7645722 Test case for issue #60 2020-05-24 20:26:47 +02:00
boukeversteegh ca20069ca3 Test case for issue #59 2020-05-24 20:26:13 +02:00
boukeversteegh 59a4a7da43 Test case for issue #58 2020-05-24 20:25:29 +02:00
boukeversteegh 15af4367e5 Test case for issue #57 2020-05-24 20:24:55 +02:00
boukeversteegh ec5683e572 Test Service instantiation as part of standard test-case 2020-05-24 20:02:41 +02:00
boukeversteegh 20150fdcf3 Cleanup 2020-05-24 19:58:49 +02:00
boukeversteegh d11b7d04c5 Document XFAIL tests 2020-05-24 19:58:35 +02:00
boukeversteegh e2d35f4696 Support xfail on test-case level, support running tests on subsets. 2020-05-24 19:58:06 +02:00
boukeversteegh c3f08b9ef2 Clear output directories before generating python files 2020-05-24 19:54:53 +02:00
boukeversteegh 24d44898f4 Only import reference module when needed. Some reference modules generate bad imports and cannot be loaded. 2020-05-24 19:53:14 +02:00
boukeversteegh 074448c996 Restore accidentally removed binary equality test 2020-05-24 19:52:14 +02:00
boukeversteegh 8f0caf1db2 Read desired wrapper type directly from wrapper definition 2020-05-24 14:50:56 +02:00
boukeversteegh c50d9e2fdc Add test for generating embedded wellknown types in outputs. 2020-05-24 14:48:39 +02:00
boukeversteegh 35548cb43e Test all supported wrapper types. Add xfail test for unwrapping the value 2020-05-24 12:34:37 +02:00
boukeversteegh b711d1e11f Merge remote-tracking branch 'daniel/master' into pr/wrapper-as-output 2020-05-24 10:41:40 +02:00
boukeversteegh 92088ebda8 Cleanup 2020-05-22 21:18:44 +02:00
boukeversteegh c3e3837f71 More concise whitelist logic 2020-05-22 21:11:23 +02:00
boukeversteegh 6bd9c7835c Fix docs 2020-05-22 21:08:08 +02:00
boukeversteegh 6ec902c1b5 Fix generate noargs. Sorted iteration. 2020-05-22 21:03:45 +02:00
boukeversteegh 960dba2ae8 Renamed docs for standard tests 2020-05-22 20:58:53 +02:00
boukeversteegh 4b4bdefb6f Add explicit test for casing rules 2020-05-22 20:58:31 +02:00
boukeversteegh dfa0a56b39 Simplify standard tests by using 1 json per case. 2020-05-22 20:58:14 +02:00
boukeversteegh dd4873dfba Re-introducing whitelisting argument to generate.py 2020-05-22 20:51:22 +02:00
boukeversteegh 77c04414f5 Update readme, add docs for standard tests 2020-05-22 16:36:43 +02:00