| 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 | |
|---|
| 24 | for module, cls in builtins: |
|---|
| 25 | try: |
|---|
| 26 | plugmod = __import__(module, globals(), locals(), [cls]) |
|---|
| 27 | except KeyboardInterrupt: |
|---|
| 28 | raise |
|---|
| 29 | except: |
|---|
| 30 | continue |
|---|
| 31 | plug = getattr(plugmod, cls) |
|---|
| 32 | plugins.append(plug) |
|---|
| 33 | globals()[cls] = plug |
|---|
| 34 | |
|---|