test_python_treq.py 761 B

1234567891011121314151617181920212223
  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. refuse_msgs = [1 for line in output if "Connection refused" in line]
  8. self.assertGreater(sum(refuse_msgs), 0)
  9. self.assertEqual(exit_code, 0)
  10. class TestPythonPy3Treq(TestPythonTreq):
  11. __test__ = True
  12. config = TestPythonPackageBase.config + \
  13. """
  14. BR2_PACKAGE_PYTHON3=y
  15. BR2_PACKAGE_PYTHON_TREQ=y
  16. BR2_TARGET_ROOTFS_CPIO=y
  17. # BR2_TARGET_ROOTFS_TAR is not set
  18. """