1import os
2
3from tests.package.test_python import TestPythonPackageBase
4
5
6class TestPythonPy3Uvloop(TestPythonPackageBase):
7    __test__ = True
8    config = TestPythonPackageBase.config + \
9        """
10        BR2_PACKAGE_PYTHON3=y
11        BR2_PACKAGE_PYTHON_UVLOOP=y
12        """
13    sample_scripts = ["tests/package/sample_python_uvloop.py"]
14
15    def test_run(self):
16        self.login()
17        self.check_sample_scripts_exist()
18
19        cmd = "%s %s" % (self.interpreter, os.path.basename(self.sample_scripts[0]))
20        output, exit_code = self.emulator.run(cmd)
21        self.assertEqual(exit_code, 0)
22        self.assertEqual(output[0], "Hello world!")
23