From 9fa2add810c0bda2c727ce55e68b4776a944d141 Mon Sep 17 00:00:00 2001 From: Titouan Christophe Date: Sun, 29 Dec 2019 21:29:12 +0100 Subject: [PATCH] support/testing: add test for python-avro This adds a test case for python-avro, with a script that performs a simple deserialization. Signed-off-by: Titouan Christophe Signed-off-by: Yann E. MORIN --- .../tests/package/sample_python_avro.py | 23 +++++++++++++++++++ .../testing/tests/package/test_python_avro.py | 11 +++++++++ 2 files changed, 34 insertions(+) create mode 100644 support/testing/tests/package/sample_python_avro.py create mode 100644 support/testing/tests/package/test_python_avro.py diff --git a/support/testing/tests/package/sample_python_avro.py b/support/testing/tests/package/sample_python_avro.py new file mode 100644 index 0000000000..79d2dcdb22 --- /dev/null +++ b/support/testing/tests/package/sample_python_avro.py @@ -0,0 +1,23 @@ +from io import BytesIO +from avro.schema import Parse +from avro.io import DatumReader, BinaryDecoder + +schema = Parse("""{ +"namespace": "org.buildroot.package.python_avro", +"type": "record", +"name": "Developer", +"fields": [ + {"name": "email", "type": "string"}, + {"name": "maintainer_of", "type": "string"} +] +}""") + +example = b'