def test_plugin_activator(self):

        @provides(IPluginActivator)
        class NullPluginActivator(HasTraits):
            """ A plugin activator that does nothing! """

            def start_plugin(self, plugin):
                """ Start a plugin. """

                self.started = plugin

                return

            def stop_plugin(self, plugin):
                """ Stop a plugin. """

                self.stopped = plugin

                return

        class PluginA(Plugin):
            id = 'A'

        class PluginB(Plugin):
            id = 'B'

        plugin_activator = NullPluginActivator()

        a = PluginA(activator=plugin_activator)
        b = PluginB()

        application = TestApplication(plugins=[a, b])
        application.start()

        # Make sure A's plugin activator was called.
        self.assertEqual(a, plugin_activator.started)

        # Stop the application.
        application.stop()

        # Make sure A's plugin activator was called.
        self.assertEqual(a, plugin_activator.stopped)

        return
Convert a timestamp from (naive) UTC to this timezone.
dataset/ETHPy150Open enthought/envisage/envisage/tests/plugin_test_case.py/PluginTestCase.test_plugin_activator--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/gcloud-python/gcloud/_helpers.py/_UTC.fromutc