2
1

test_python_treq.py 797 B

1234567891011121314151617181920212223242526272829
  1. from tests.package.test_python import TestPythonPackageBase
  2. class TestPythonTreq(TestPythonPackageBase):
  3. sample_scripts = ["tests/package/sample_python_treq.py"]
  4. def run_sample_scripts(self):
  5. cmd = self.interpreter + " sample_python_treq.py"
  6. output, exit_code = self.emulator.run(cmd, timeout=20)
  7. self.assertIn("Connection refused", output[0])
  8. self.assertEqual(exit_code, 0)
  9. class TestPythonPy2Treq(TestPythonTreq):
  10. __test__ = True
  11. config = TestPythonTreq.config + \
  12. """
  13. BR2_PACKAGE_PYTHON=y
  14. BR2_PACKAGE_PYTHON_TREQ=y
  15. """
  16. class TestPythonPy3Treq(TestPythonTreq):
  17. __test__ = True
  18. config = TestPythonTreq.config + \
  19. """
  20. BR2_PACKAGE_PYTHON3=y
  21. BR2_PACKAGE_PYTHON_TREQ=y
  22. """