diff mbox series

support/testing: add python-msgpack runtime test

Message ID 20240212000058.3000442-1-buildroot@bubu1.eu
State Accepted
Headers show
Series support/testing: add python-msgpack runtime test | expand

Commit Message

Marcus Hoffmann Feb. 12, 2024, midnight UTC
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

Comments

Peter Korsgaard Aug. 20, 2024, 7:46 p.m. UTC | #1
>>>>> "Marcus" == Marcus Hoffmann via buildroot <buildroot@buildroot.org> writes:

 > 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)

packaed? Did you mean packaged or packed?

Committed to 2024.02.x and 2024.05.x, thanks.
diff mbox series

Patch

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