Files
buildroot/support/testing/tests/package/test_python_gymnasium.py
Xukai Wang b647b0c95d support/testing: add python-gymnasium tests
Add a basic runtime test for the python-gymnasium package.
This test verifies the fundamental operations of the library by:
- Importing `gymnasium`.
- Creating a "CartPole-v1" environment.
- Resetting the environment.
- Taking a random action step.
- Closing the environment.

Signed-off-by: Xukai Wang <kingxukai@zohomail.com>
[Julien:
 - sort DEVELOPERS entries alphabetically
 - fix file name typo in DEVELOPERS
 - remove selection of dependencies in test config
]
Signed-off-by: Julien Olivain <ju.o@free.fr>
2026-03-29 12:57:57 +02:00

13 lines
357 B
Python

from tests.package.test_python import TestPythonPackageBase
class TestPythonPy3Gymnasium(TestPythonPackageBase):
__test__ = True
config = TestPythonPackageBase.config + \
"""
BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_PYTHON_GYMNASIUM=y
"""
sample_scripts = ["tests/package/sample_python_gymnasium.py"]
timeout = 20