"""Small synthetic catalogs for infrastructure tests, never production fallback. Dependency/process tests separately exercise the real data path without mocks. """ from unittest.mock import patch from generator import production, vocabulary from tests import rhythm_fixtures, scale_fixtures, solo_fixtures def install(test): resources=vocabulary.load() libraries=(scale_fixtures.library(),solo_fixtures.library(),rhythm_fixtures.library()) tree=production.generate_tree def serial(*args,**kwargs): kwargs['jobs']=1 return tree(*args,**kwargs) test.enterContext(patch('generator.production.generate_tree',side_effect=serial)) test.enterContext(patch('generator.vocabulary.load',return_value=resources)) test.enterContext(patch('generator.production._solo_libraries',return_value=libraries)) test.enterContext(patch('generator.production._resource_key',return_value={'fixture':'independently authored synthetic catalogs'}))