What
Discovered while verifying issue #12979 batch 9 (unrelated scope — this test does not exercise any converted code path). Confirmed pre-existing via cp-swap of voice_processing/providers/lv/tilde_provider.py against origin/Dev_new_gui — identical failure with the unmodified file.
autobot-backend/voice_processing/providers/test_registry.py::TestGlobalRegistry::test_get_speech_provider_convenience fails when the file is run standalone (or as part of a smaller subset that doesn't happen to import the module that populates the global registry first):
FAILED voice_processing/providers/test_registry.py::TestGlobalRegistry::test_get_speech_provider_convenience
AssertionError: assert None is not None
WARNING voice_processing.providers:__init__.py:100 No provider registered for language: lv
Root cause
voice_processing/providers/test_registry.py:229-237:
def test_get_speech_provider_convenience(self):
"""Test convenience function get_speech_provider."""
# This will return provider from the global registry
# which should have providers registered via registry_init
provider = get_speech_provider("lv")
# After registry_init, we should have providers for 'lv'
# Note: This test assumes registry_init has been imported
assert provider is not None
The test's own comment admits it "assumes registry_init has been imported" elsewhere in the process — i.e. it relies on import-order side effects from another test module having already populated the process-global speech-provider registry singleton. When this file runs alone (pytest voice_processing/providers/test_registry.py), nothing has imported the module that registers the lv provider, so get_speech_provider("lv") returns None and the test fails.
Evidence
$ python3 -m pytest autobot-backend/voice_processing/providers/test_registry.py -q
1 failed, 13 passed in 0.99s
Same single failure reproduces against origin/Dev_new_gui's unmodified tilde_provider.py (cp-swap baseline, no diff) — confirming the failure is unrelated to any HTTP-client change.
Suggested fix
Add an explicit fixture (e.g. import voice_processing.registry_init or call whatever registers the default providers) at the top of the test, or in a module/session-scoped autouse fixture, so the test does not depend on other test modules having run first in the same process.
Model Used
Sonnet (claude-sonnet-5)
What
Discovered while verifying issue #12979 batch 9 (unrelated scope — this test does not exercise any converted code path). Confirmed pre-existing via
cp-swap ofvoice_processing/providers/lv/tilde_provider.pyagainstorigin/Dev_new_gui— identical failure with the unmodified file.autobot-backend/voice_processing/providers/test_registry.py::TestGlobalRegistry::test_get_speech_provider_conveniencefails when the file is run standalone (or as part of a smaller subset that doesn't happen to import the module that populates the global registry first):Root cause
voice_processing/providers/test_registry.py:229-237:The test's own comment admits it "assumes
registry_inithas been imported" elsewhere in the process — i.e. it relies on import-order side effects from another test module having already populated the process-global speech-provider registry singleton. When this file runs alone (pytest voice_processing/providers/test_registry.py), nothing has imported the module that registers thelvprovider, soget_speech_provider("lv")returnsNoneand the test fails.Evidence
Same single failure reproduces against
origin/Dev_new_gui's unmodifiedtilde_provider.py(cp-swap baseline, no diff) — confirming the failure is unrelated to any HTTP-client change.Suggested fix
Add an explicit fixture (e.g.
import voice_processing.registry_initor call whatever registers the default providers) at the top of the test, or in a module/session-scopedautousefixture, so the test does not depend on other test modules having run first in the same process.Model Used
Sonnet (claude-sonnet-5)