[Buildroot] [git commit branch/2025.02.x] support/testing: python-pydal: new runtime test

Titouan Christophe via buildroot <[email protected]>
Newsgroups net.busybox.buildroot
Message-ID <[email protected]>
commit: https://gitlab.com/buildroot.org/buildroot/-/commit/0dd9fc7c90791cc0353337a903dc5fd1e51ecd82
branch: https://gitlab.com/buildroot.org/buildroot/-/tree/2025.02.x

Signed-off-by: Julien Olivain <[email protected]>
(cherry picked from commit 67d6e6602fec095084f64560050cb1195dff7765)
Signed-off-by: Titouan Christophe <[email protected]>
---
 DEVELOPERS                                           |  2 ++
 support/testing/tests/package/sample_python_pydal.py | 11 +++++++++++
 support/testing/tests/package/test_python_pydal.py   | 12 ++++++++++++
 3 files changed, 25 insertions(+)

diff --git a/DEVELOPERS b/DEVELOPERS
index e492e03694..d400a0c2b6 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1795,6 +1795,7 @@ F:	support/testing/tests/package/sample_python_midiutil.py
 F:	support/testing/tests/package/sample_python_ml_dtypes.py
 F:	support/testing/tests/package/sample_python_mpmath.py
 F:	support/testing/tests/package/sample_python_pyalsa.py
+F:	support/testing/tests/package/sample_python_pydal.py
 F:	support/testing/tests/package/sample_python_spake2.py
 F:	support/testing/tests/package/sample_python_sympy.py
 F:	support/testing/tests/package/test_4th.py
@@ -1948,6 +1949,7 @@ F:	support/testing/tests/package/test_python_midiutil.py
 F:	support/testing/tests/package/test_python_ml_dtypes.py
 F:	support/testing/tests/package/test_python_mpmath.py
 F:	support/testing/tests/package/test_python_pyalsa.py
+F:	support/testing/tests/package/test_python_pydal.py
 F:	support/testing/tests/package/test_python_pyqt5.py
 F:	support/testing/tests/package/test_python_pyqt5/
 F:	support/testing/tests/package/test_python_spake2.py
diff --git a/support/testing/tests/package/sample_python_pydal.py b/support/testing/tests/package/sample_python_pydal.py
new file mode 100644
index 0000000000..269fbaffa8
--- /dev/null
+++ b/support/testing/tests/package/sample_python_pydal.py
@@ -0,0 +1,11 @@
+# From:
+# https://github.com/web2py/pydal/tree/v20260313.1#usage-and-documentation
+from pydal import DAL, Field
+db = DAL('sqlite://storage.db')
+db.define_table('thing', Field('name'))
+db.thing.insert(name='Chair')
+query = db.thing.name.startswith('C')
+rows = db(query).select()
+print(rows[0].name)
+assert rows[0].name == "Chair"
+db.commit()
diff --git a/support/testing/tests/package/test_python_pydal.py b/support/testing/tests/package/test_python_pydal.py
new file mode 100644
index 0000000000..b0166c7a8a
--- /dev/null
+++ b/support/testing/tests/package/test_python_pydal.py
@@ -0,0 +1,12 @@
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonPy3PyDAL(TestPythonPackageBase):
+    __test__ = True
+    config = TestPythonPackageBase.config + \
+        """
+        BR2_PACKAGE_PYTHON3=y
+        BR2_PACKAGE_PYTHON3_SQLITE=y
+        BR2_PACKAGE_PYTHON_PYDAL=y
+        """
+    sample_scripts = ["tests/package/sample_python_pydal.py"]
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.