diff --git a/DEVELOPERS b/DEVELOPERS index e8764035b2..32ed4acdc5 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2302,6 +2302,7 @@ F: package/python-typing-inspection/ F: package/python-tzlocal/ F: package/python-sdbus-modemmanager/ F: package/python-waitress/ +F: support/testing/tests/package/test_python_apscheduler.py F: support/testing/tests/package/test_python_crc.py F: support/testing/tests/package/test_python_django.py F: support/testing/tests/package/test_python_fastapi.py @@ -2311,6 +2312,7 @@ F: support/testing/tests/package/test_python_ruamel_yaml.py F: support/testing/tests/package/test_python_sdbus_modemmanager.py F: support/testing/tests/package/test_python_tzlocal.py F: support/testing/tests/package/test_python_waitress.py +F: support/testing/tests/package/sample_python_apscheduler.py F: support/testing/tests/package/sample_python_crc.py F: support/testing/tests/package/sample_python_django.py F: support/testing/tests/package/sample_python_fastapi.py diff --git a/support/testing/tests/package/sample_python_apscheduler.py b/support/testing/tests/package/sample_python_apscheduler.py new file mode 100644 index 0000000000..befe424c28 --- /dev/null +++ b/support/testing/tests/package/sample_python_apscheduler.py @@ -0,0 +1,15 @@ +from queue import Queue +from apscheduler.schedulers.background import BackgroundScheduler + +queue = Queue() + + +def work(): + queue.put("Ping!") + + +scheduler = BackgroundScheduler() +scheduler.add_job(work, "interval", seconds=1) +scheduler.start() +result = queue.get(timeout=3) +assert result == "Ping!" diff --git a/support/testing/tests/package/test_python_apscheduler.py b/support/testing/tests/package/test_python_apscheduler.py new file mode 100644 index 0000000000..19eb8c9b41 --- /dev/null +++ b/support/testing/tests/package/test_python_apscheduler.py @@ -0,0 +1,12 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy3Apscheduler(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_APSCHEDULER=y + """ + sample_scripts = ["tests/package/sample_python_apscheduler.py"] + timeout = 15