diff options
Diffstat (limited to 'lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/trial/test/test_plugins.py')
-rwxr-xr-x | lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/trial/test/test_plugins.py | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/trial/test/test_plugins.py b/lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/trial/test/test_plugins.py deleted file mode 100755 index e1ec6aa7..00000000 --- a/lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/trial/test/test_plugins.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (c) Twisted Matrix Laboratories. -# See LICENSE for details. -# -# Maintainer: Jonathan Lange - -""" -Tests for L{twisted.plugins.twisted_trial}. -""" - -from twisted.plugin import getPlugins -from twisted.trial import unittest -from twisted.trial.itrial import IReporter - - -class TestPlugins(unittest.TestCase): - """ - Tests for Trial's reporter plugins. - """ - - def getPluginsByLongOption(self, longOption): - """ - Return the Trial reporter plugin with the given long option. - - If more than one is found, raise ValueError. If none are found, raise - IndexError. - """ - plugins = [ - plugin for plugin in getPlugins(IReporter) - if plugin.longOpt == longOption] - if len(plugins) > 1: - raise ValueError( - "More than one plugin found with long option %r: %r" - % (longOption, plugins)) - return plugins[0] - - - def test_subunitPlugin(self): - """ - One of the reporter plugins is the subunit reporter plugin. - """ - subunitPlugin = self.getPluginsByLongOption('subunit') - self.assertEqual('Subunit Reporter', subunitPlugin.name) - self.assertEqual('twisted.trial.reporter', subunitPlugin.module) - self.assertEqual('subunit', subunitPlugin.longOpt) - self.assertIdentical(None, subunitPlugin.shortOpt) - self.assertEqual('SubunitReporter', subunitPlugin.klass) |