Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update pytest_asyncio.fixture default scope and fix broken registry t…
…ests Summary: Addressing the pytest warning: ``` /opt/homebrew/Caskroom/miniconda/base/envs/llama-stack/lib/python3.11/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset. The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session" warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET)) ``` Details in this discussion * #699 (comment) Additional fix: * Tests were broken after registry.get return type was changed from `List[RoutableObjectWithProvider]` to `Optional[RoutableObjectWithProvider]` in efe791b#diff-5de152bae521b7baef01048a4c0142484f8f1c978a04f3b55f4e4dabc52835beL29 Test Plan: Run tests ``` pytest llama_stack/distribution/store/tests/test_registry.py -v collected 6 items llama_stack/distribution/store/tests/test_registry.py::test_registry_initialization PASSED [ 16%] llama_stack/distribution/store/tests/test_registry.py::test_basic_registration PASSED [ 33%] llama_stack/distribution/store/tests/test_registry.py::test_cached_registry_initialization PASSED [ 50%] llama_stack/distribution/store/tests/test_registry.py::test_cached_registry_updates PASSED [ 66%] llama_stack/distribution/store/tests/test_registry.py::test_duplicate_provider_registration PASSED [ 83%] llama_stack/distribution/store/tests/test_registry.py::test_get_all_objects PASSED [100%] ```
- Loading branch information