Plugins/Hooks¶
Much like pytest, itself, pytest-localstack uses pluggy to implement a plugin system. These plugins can be used to add additional functionality to pytest-localstack and to trigger callbacks when the Localstack container is started and stopped.
-
pytest_localstack.hookspecs.contribute_to_module(pytest_localstack)[source]¶ Hook to add additional functionality to the
pytest_localstackmodule.Primarially used to add importable fixture factories at a top level.
-
pytest_localstack.hookspecs.contribute_to_session(session)[source]¶ Hook to add additional functionality to
LocalstackSession.Primarially used to add test resource factories to sessions. See
pytest_localstack.contrib.botocorefor an example of that.
-
pytest_localstack.hookspecs.pytest_localstack_hookimpl= <pluggy.HookimplMarker object>¶ This is a test.
-
pytest_localstack.hookspecs.session_started(session)[source]¶ Hook fired when
LocalstackSessionhas started.
-
pytest_localstack.hookspecs.session_starting(session)[source]¶ Hook fired when
LocalstackSessionis starting.
-
pytest_localstack.hookspecs.session_stopped(session)[source]¶ Hook fired when
LocalstackSessionhas stopped.
-
pytest_localstack.hookspecs.session_stopping(session)[source]¶ Hook fired when
LocalstackSessionis stopping.
Plugins manager.
See also
-
pytest_localstack.plugin.register_plugin_module(module_path, required=True)[source]¶ Register hooks in a module with the PluginManager by Python path.
Parameters: Returns: The imported module.
Raises: ImportError– If required is True and the module cannot be imported.