summaryrefslogtreecommitdiffstats
path: root/tests/inputs/regression_387
diff options
context:
space:
mode:
Diffstat (limited to 'tests/inputs/regression_387')
-rw-r--r--tests/inputs/regression_387/regression_387.proto12
-rw-r--r--tests/inputs/regression_387/test_regression_387.py12
2 files changed, 24 insertions, 0 deletions
diff --git a/tests/inputs/regression_387/regression_387.proto b/tests/inputs/regression_387/regression_387.proto
new file mode 100644
index 0000000..57bd954
--- /dev/null
+++ b/tests/inputs/regression_387/regression_387.proto
@@ -0,0 +1,12 @@
+syntax = "proto3";
+
+package regression_387;
+
+message Test {
+ uint64 id = 1;
+}
+
+message ParentElement {
+ string name = 1;
+ repeated Test elems = 2;
+} \ No newline at end of file
diff --git a/tests/inputs/regression_387/test_regression_387.py b/tests/inputs/regression_387/test_regression_387.py
new file mode 100644
index 0000000..92d96ba
--- /dev/null
+++ b/tests/inputs/regression_387/test_regression_387.py
@@ -0,0 +1,12 @@
+from tests.output_aristaproto.regression_387 import (
+ ParentElement,
+ Test,
+)
+
+
+def test_regression_387():
+ el = ParentElement(name="test", elems=[Test(id=0), Test(id=42)])
+ binary = bytes(el)
+ decoded = ParentElement().parse(binary)
+ assert decoded == el
+ assert decoded.elems == [Test(id=0), Test(id=42)]