xref: /OK3568_Linux_fs/buildroot/support/testing/tests/package/test_python_pytest_asyncio.py (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1import os
2
3from tests.package.test_python import TestPythonPackageBase
4
5
6class TestPythonPy3PytestAsyncio(TestPythonPackageBase):
7    __test__ = True
8    config = TestPythonPackageBase.config + \
9        """
10        BR2_PACKAGE_PYTHON3=y
11        BR2_PACKAGE_PYTHON_PYTEST=y
12        BR2_PACKAGE_PYTHON_PYTEST_ASYNCIO=y
13        """
14    sample_scripts = ["tests/package/sample_python_pytest_asyncio.py"]
15
16    def run_sample_scripts(self):
17        for script in self.sample_scripts:
18            cmd = self.interpreter + " -m pytest " + os.path.basename(script)
19            self.assertRunOk(cmd, timeout=self.timeout)
20