pytest_houdini package

Subpackages

Submodules

pytest_houdini.exceptions module

Exceptions raised by pytest-houdini.

exception pytest_houdini.exceptions.UnsupportedCategoryError(category: hou.NodeTypeCategory)[source]

Bases: ValueError

Exception raised when an invalid node type category is passed.

Parameters:

category – The invalid node type category.

pytest_houdini.plugin module

Initialize the pytest-houdini plugin.

pytest_houdini.tools module

This module contains supporting tooling for testing in Houdini.

pytest_houdini.tools.context_container(category: hou.NodeTypeCategory, *, destroy: bool = True) Generator[hou.OpNode][source]

Context manager that provides an appropriate node to create a node under.

>>> with context_container(hou.sopNodeTypeCategory()) as parent:
...     parent.createNode("box")
Parameters:
  • category – The node type category of the node to create.

  • destroy – Whether to destroy the node after the scope ends.

Returns:

An appropriate parent node to create a node of the desired type under.

Raises:

ValueError – Raised if the category does not correspond to a known type.

Module contents