From 6e6597de2173cab3e40a115cf1282c9cf9ebd913 Mon Sep 17 00:00:00 2001 From: Xukai Wang Date: Fri, 13 Feb 2026 03:03:48 +0800 Subject: [PATCH] support/testing: add python-farama-notifications tests Add a basic runtime test for the python-farama-notifications package. This test verifies that the `farama_notifications` package can be imported successfully and that a test notification can be stored within its `notifications` dictionary-like object. Signed-off-by: Xukai Wang [Julien: - sort DEVELOPERS entries alphabetically - remove underscore in test class name ] Signed-off-by: Julien Olivain --- DEVELOPERS | 2 ++ .../package/sample_python_farama_notifications.py | 6 ++++++ .../package/test_python_farama_notifications.py | 12 ++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 support/testing/tests/package/sample_python_farama_notifications.py create mode 100644 support/testing/tests/package/test_python_farama_notifications.py diff --git a/DEVELOPERS b/DEVELOPERS index 767de9b964..f0aadbbcd3 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -3484,7 +3484,9 @@ F: package/python-cloudpickle/ F: package/python-farama-notifications/ F: package/python-gymnasium/ F: support/testing/tests/package/sample_python_cloudpickle.py +F: support/testing/tests/package/sample_python_farama_notifications.py F: support/testing/tests/package/test_python_cloudpickle.py +F: support/testing/tests/package/test_python_farama_notifications.py N: Yair Ben Avraham F: package/casync/ diff --git a/support/testing/tests/package/sample_python_farama_notifications.py b/support/testing/tests/package/sample_python_farama_notifications.py new file mode 100644 index 0000000000..35bedabcc4 --- /dev/null +++ b/support/testing/tests/package/sample_python_farama_notifications.py @@ -0,0 +1,6 @@ +import farama_notifications + +NOTIFICATION_ID = "test_event_occurrence" +NOTIFICATION_MESSAGE = "A test event has occurred in Buildroot environment!" + +farama_notifications.notifications[NOTIFICATION_ID] = NOTIFICATION_MESSAGE diff --git a/support/testing/tests/package/test_python_farama_notifications.py b/support/testing/tests/package/test_python_farama_notifications.py new file mode 100644 index 0000000000..d662ac077e --- /dev/null +++ b/support/testing/tests/package/test_python_farama_notifications.py @@ -0,0 +1,12 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy3FaramaNotifications(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_FARAMA_NOTIFICATIONS=y + """ + sample_scripts = ["tests/package/sample_python_farama_notifications.py"] + timeout = 20