test_ipython.py 939 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import os
  2. from tests.package.test_python import TestPythonBase
  3. #
  4. # The following pythong tests are not being used here:
  5. #
  6. # - version_test: IPython does not support --version option
  7. #
  8. # - zlib_test: IPython does not return a non-zero code the way CPython
  9. # does, so this test ends up being a false-negative
  10. #
  11. class TestIPythonPy2(TestPythonBase):
  12. config = TestPythonBase.config + \
  13. """
  14. BR2_PACKAGE_PYTHON=y
  15. BR2_PACKAGE_PYTHON_IPYTHON=y
  16. """
  17. interpreter = "ipython"
  18. def test_run(self):
  19. self.login()
  20. self.math_floor_test(40)
  21. self.libc_time_test(40)
  22. class TestIPythonPy3(TestPythonBase):
  23. config = TestPythonBase.config + \
  24. """
  25. BR2_PACKAGE_PYTHON3=y
  26. BR2_PACKAGE_PYTHON_IPYTHON=y
  27. """
  28. interpreter = "ipython"
  29. def test_run(self):
  30. self.login()
  31. self.math_floor_test(40)
  32. self.libc_time_test(40)