Skip to contentSkip to conversation

support/testing: add python-msgpack runtime test

PATCH In review Marcus Hoffmann via buildroot 2 participants 2 messages Feb 12, 2024 – Aug 20, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 support/testing: add python-msgpack runtime test

---
 .../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
support/testing/tests/package/sample_python_msgpack.py new file +5 -0
new file mode 100644
index 0000000000..1940f70821
@@ -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]
support/testing/tests/package/test_python_msgpack.py new file +12 -0
new file mode 100644
index 0000000000..e5876e400d
@@ -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
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 16 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Marcus" == Marcus Hoffmann via buildroot <[email protected]> writes:

---
 .../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
support/testing/tests/package/sample_python_msgpack.py new file +0 -0
new file mode 100644
index 0000000000..1940f70821

support/testing/tests/package/sample_python_msgpack.py line 3

Quoted 3 lines
support/testing/tests/package/sample_python_msgpack.py new file +3 -0
@@ -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.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot