Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

import_error.py 655B

123456789101112131415161718192021222324252627
  1. """ Test that import errors are detected. """
  2. # pylint: disable=invalid-name, unused-import, no-absolute-import, bare-except, broad-except, wrong-import-order, wrong-import-position
  3. import totally_missing # [import-error]
  4. try:
  5. import maybe_missing
  6. except ImportError:
  7. maybe_missing = None
  8. try:
  9. import maybe_missing_1
  10. except (ImportError, SyntaxError):
  11. maybe_missing_1 = None
  12. try:
  13. import maybe_missing_2 # [import-error]
  14. except ValueError:
  15. maybe_missing_2 = None
  16. try:
  17. if maybe_missing:
  18. import really_missing
  19. except ImportError:
  20. pass
  21. from .collections import missing # [import-error]