[Buildroot] [git commit branch/2026.05.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/a96a10636901629307201c0b93f707d839d4bd23 branch: https://gitlab.com/buildroot.org/buildroot/-/tree/2026.05.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 89fb3fceeb..0d3f3c8f9d 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1845,6 +1845,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 @@ -2000,6 +2001,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