What are good approaches to debug/test shader nodes?

I’m working on pretty complicated node setup. Nodes are quite well organized into separate functional groups, but many of them have no visual meaning (e.g. pure math or something).

Maybe, there’s some way to ‘execute’ a node tree or node group from python to check output values?

The only idea I have is to construct special scene with a flat square, construct special material with emission shader corresponding to output values, and then check rendered result pixel-by-pixel.