From 34c34bd15a70c0812f51ab2d80e8527be0067def Mon Sep 17 00:00:00 2001 From: boukeversteegh Date: Wed, 10 Jun 2020 23:29:01 +0200 Subject: [PATCH] Add failing test for importing a message from package that looks like a nested type #87 --- betterproto/tests/inputs/config.py | 3 ++- .../inputs/import_capitalized_package/capitalized.proto | 8 ++++++++ .../tests/inputs/import_capitalized_package/test.proto | 9 +++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 betterproto/tests/inputs/import_capitalized_package/capitalized.proto create mode 100644 betterproto/tests/inputs/import_capitalized_package/test.proto diff --git a/betterproto/tests/inputs/config.py b/betterproto/tests/inputs/config.py index 4e416e0..0191227 100644 --- a/betterproto/tests/inputs/config.py +++ b/betterproto/tests/inputs/config.py @@ -7,7 +7,8 @@ xfail = { "namespace_keywords", # 70 "namespace_builtin_types", # 53 "googletypes_struct", # 9 - "googletypes_value", # 9 + "googletypes_value", # 9, + "import_capitalized_package", } services = { diff --git a/betterproto/tests/inputs/import_capitalized_package/capitalized.proto b/betterproto/tests/inputs/import_capitalized_package/capitalized.proto new file mode 100644 index 0000000..0b73bab --- /dev/null +++ b/betterproto/tests/inputs/import_capitalized_package/capitalized.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; + + +package Capitalized; + +message Message { + +} diff --git a/betterproto/tests/inputs/import_capitalized_package/test.proto b/betterproto/tests/inputs/import_capitalized_package/test.proto new file mode 100644 index 0000000..f94bbc9 --- /dev/null +++ b/betterproto/tests/inputs/import_capitalized_package/test.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +import "capitalized.proto"; + +// Tests that we can import from a package with a capital name, that looks like a nested type, but isn't. + +message Test { + Capitalized.Message message = 1; +}