diff options
author | Doug Hellmann <doug.hellmann@dreamhost.com> | 2013-11-25 11:03:28 -0500 |
---|---|---|
committer | Doug Hellmann <doug.hellmann@dreamhost.com> | 2013-11-25 11:03:28 -0500 |
commit | f3de811157c7535c0bb052473ef9641ea2fa2072 (patch) | |
tree | 2d7b4fd105fb0d0a24468b167c2429f7e39fc06c | |
parent | cb5db9fb2d98b1a866a9011444a365a738c7d369 (diff) | |
download | stevedore-f3de811157c7535c0bb052473ef9641ea2fa2072.tar.gz |
deprecate TestExtensionManager
Change-Id: I3b319dc88edac538ebbba1102935d426b8dd5780
-rw-r--r-- | stevedore/tests/manager.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/stevedore/tests/manager.py b/stevedore/tests/manager.py index ed2ccc6..888e570 100644 --- a/stevedore/tests/manager.py +++ b/stevedore/tests/manager.py @@ -4,6 +4,7 @@ Extension manager used only for testing. """ import logging +import warnings from stevedore import extension @@ -14,6 +15,12 @@ LOG = logging.getLogger(__name__) class TestExtensionManager(extension.ExtensionManager): """ExtensionManager that is explicitly initialized for tests. + .. deprecated:: 0.13 + + Use the :func:`make_test_instance` class method of the class + being replaced by the test instance instead of using this class + directly. + :param extensions: Pre-configured Extension instances to use instead of loading them from entry points. :type extensions: list of :class:`~stevedore.extension.Extension` @@ -30,6 +37,7 @@ class TestExtensionManager(extension.ExtensionManager): the object returned by the entry point. Only used if invoke_on_load is True. :type invoke_kwds: dict + """ def __init__(self, extensions, @@ -43,6 +51,9 @@ class TestExtensionManager(extension.ExtensionManager): invoke_kwds, ) self.extensions = extensions + warnings.warn( + 'TestExtesionManager has been replaced by make_test_instance()', + DeprecationWarning) def _load_plugins(self, invoke_on_load, invoke_args, |