builtin.py 1021 B

12345678910111213141516171819202122232425262728293031323334
  1. """
  2. Lists builtin plugins.
  3. """
  4. plugins = []
  5. builtins = (
  6. ('nose.plugins.attrib', 'AttributeSelector'),
  7. ('nose.plugins.capture', 'Capture'),
  8. ('nose.plugins.logcapture', 'LogCapture'),
  9. ('nose.plugins.cover', 'Coverage'),
  10. ('nose.plugins.debug', 'Pdb'),
  11. ('nose.plugins.deprecated', 'Deprecated'),
  12. ('nose.plugins.doctests', 'Doctest'),
  13. ('nose.plugins.isolate', 'IsolationPlugin'),
  14. ('nose.plugins.failuredetail', 'FailureDetail'),
  15. ('nose.plugins.prof', 'Profile'),
  16. ('nose.plugins.skip', 'Skip'),
  17. ('nose.plugins.testid', 'TestId'),
  18. ('nose.plugins.multiprocess', 'MultiProcess'),
  19. ('nose.plugins.xunit', 'Xunit'),
  20. ('nose.plugins.allmodules', 'AllModules'),
  21. ('nose.plugins.collect', 'CollectOnly'),
  22. )
  23. for module, cls in builtins:
  24. try:
  25. plugmod = __import__(module, globals(), locals(), [cls])
  26. except KeyboardInterrupt:
  27. raise
  28. except:
  29. continue
  30. plug = getattr(plugmod, cls)
  31. plugins.append(plug)
  32. globals()[cls] = plug