All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] support/testing: add python-msgpack runtime test
@ 2024-02-12  0:00 Marcus Hoffmann via buildroot
  0 siblings, 0 replies; only message in thread
From: Marcus Hoffmann via buildroot @ 2024-02-12  0:00 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
---
 .../testing/tests/package/sample_python_msgpack.py   |  5 +++++
 support/testing/tests/package/test_python_msgpack.py | 12 ++++++++++++
 2 files changed, 17 insertions(+)
 create mode 100644 support/testing/tests/package/sample_python_msgpack.py
 create mode 100644 support/testing/tests/package/test_python_msgpack.py

diff --git a/support/testing/tests/package/sample_python_msgpack.py b/support/testing/tests/package/sample_python_msgpack.py
new file mode 100644
index 0000000000..1940f70821
--- /dev/null
+++ b/support/testing/tests/package/sample_python_msgpack.py
@@ -0,0 +1,5 @@
+import msgpack
+
+packaed = msgpack.packb([1, 2, 3], use_bin_type=True)
+
+assert msgpack.unpackb(packaed, raw=False) == [1, 2, 3]
diff --git a/support/testing/tests/package/test_python_msgpack.py b/support/testing/tests/package/test_python_msgpack.py
new file mode 100644
index 0000000000..e5876e400d
--- /dev/null
+++ b/support/testing/tests/package/test_python_msgpack.py
@@ -0,0 +1,12 @@
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonPy3MsgPack(TestPythonPackageBase):
+    __test__ = True
+    config = TestPythonPackageBase.config + \
+        """
+        BR2_PACKAGE_PYTHON3=y
+        BR2_PACKAGE_PYTHON_MSGPACK=y
+        """
+    sample_scripts = ["tests/package/sample_python_msgpack.py"]
+    timeout = 40
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-12  0:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-12  0:00 [Buildroot] [PATCH] support/testing: add python-msgpack runtime test Marcus Hoffmann via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.