tests.unit.test_setup_function_unit module

tests.unit.test_setup_function_unit module#

Unit tests for the setup function of the sphinx_diagram_connect extension.

These tests ensure that the setup function correctly registers the extension, connects to the ‘build-finished’ event, and adds necessary configuration values to the Sphinx application, using mocks for isolation.

class tests.unit.test_setup_function_unit.TestSetupFunction#

Bases: object

Unit tests for the setup function.

test_setup_registers_extension(mock_sphinx_app: MagicMock)#

Tests that the setup function correctly registers the extension, connects the build-finished event, and adds the config value.

Parameters#

mock_sphinx_appMagicMock

A mock Sphinx application object provided by the mock_sphinx_app fixture.