test_python_autobahn.py 780 B

1234567891011121314151617181920212223242526272829303132
  1. from tests.package.test_python import TestPythonBase
  2. class TestPythonAutobahn(TestPythonBase):
  3. def import_test(self):
  4. cmd = self.interpreter + " -c 'import autobahn.wamp'"
  5. _, exit_code = self.emulator.run(cmd)
  6. self.assertEqual(exit_code, 0)
  7. class TestPythonPy2Autobahn(TestPythonAutobahn):
  8. config = TestPythonBase.config + \
  9. """
  10. BR2_PACKAGE_PYTHON=y
  11. BR2_PACKAGE_PYTHON_AUTOBAHN=y
  12. """
  13. def test_run(self):
  14. self.login()
  15. self.import_test()
  16. class TestPythonPy3Autobahn(TestPythonAutobahn):
  17. config = TestPythonBase.config + \
  18. """
  19. BR2_PACKAGE_PYTHON3=y
  20. BR2_PACKAGE_PYTHON_AUTOBAHN=y
  21. """
  22. def test_run(self):
  23. self.login()
  24. self.import_test()