'Test that the usage mixin exits when trying to use a reactor not
available (the reactor raises an error at installation), giving an
error message.'

def test_reactorSelectionMixinNotAvailable(self):

    class ReactorSelectionOptions(usage.Options, app.ReactorSelectionMixin, ):
        pass
    message = 'Missing    foo    bar'
    def install():
        raise ImportError(message)
    name = 'fakereactortest'
    package = __name__
    description = 'description'
    self.pluginResults = [FakeReactor(install, name, package, description)]
    options = ReactorSelectionOptions()
    options.messageOutput = NativeStringIO()
    e = self.assertRaises(usage.UsageError, options.parseOptions, ['--reactor', 'fakereactortest', 'subcommand'])
    self.assertIn(message, e.args[0])
    self.assertIn('help-reactors', e.args[0])
