The project includes unit tests and functional tests.
test_init.py: DLL loading and error handlingtest_config.py: Configuration managementtest_models.py: Data model validationtest_utils.py: Decorators and utilitiestest_tekla_utils.py: Tekla API wrapper teststest_tekla_model.py: TeklaModel connection wrapper (singleton, thread safety)test_tekla_model_object.py: Tekla ModelObject wrapperstest_tekla_view.py: Tekla view wrappertest_tekla_template_attrs_parser.py: Template attribute parsingtest_component_handlers.py: Component handler pluginstest_embeddings.py: Semantic attribute resolutiontest_modeling.py: Modeling utilitiestest_tool_annotations.py: Guards that every tool declaresreadOnlyHint/destructiveHinttest_docs_reference_parity.py: Guards thatdocs/reference.mdmatches the provider code
conftest.py: Shared fixtures and utilitiestest_components.py: Component placement, removal, modificationtest_selection.py: Element selection by filter, GUID, assemblytest_view.py: View operations (labels, zoom, filters)test_operations.py: Boolean cuts, cut part conversion, macrostest_properties.py: Property get/set, UDAs, numbering, comparison, IFC property copytest_drawings.py: Drawing retrieval and propertiestest_modeling.py: Modeling operations (beams, columns, grids, etc.)
# Run all tests (functional tests skipped if Tekla not running)
uv run pytest tests/
# Run only unit tests
uv run pytest tests/unit/
# Run specific test file
uv run pytest tests/unit/test_models.py
# Run specific test function
uv run pytest tests/unit/test_models.py::test_get_element_type_by_class_validAll test object names (parts, assemblies, UDAs) must start with MCP_TEST_ prefix to prevent conflicts and make cleanup easy.
- Functional tests modify actual Tekla model - run only in test/development environment
- Unit tests do not require Tekla to be running
test_docs_reference_parity.pyandtest_tool_annotations.pyparse the provider source via AST, so they run in CI without Tekla. Updatedocs/reference.mdwhenever you add or remove a tool or resource, or these tests fail