Skip to content

Conversation

@ultmaster
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings November 5, 2025 11:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the test suite to support testing multiple store implementations (InMemory, SQL, etc.) by introducing a parameterized store_fixture that can be easily extended. The main changes prepare the codebase for future SQL store implementation.

  • Introduced a parameterized store_fixture in conftest.py that currently tests only InMemoryLightningStore but can be extended to include SQL stores
  • Updated all test functions to use the generic store_fixture parameter instead of the specific inmemory_store parameter
  • Updated docstrings to reflect the broader scope of tests covering multiple implementations

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.

File Description
tests/store/test_implementation.py Replaced all inmemory_store parameter references with generic store_fixture to enable testing across multiple store implementations
tests/store/test_client_server.py Updated server_client fixture to use store_fixture parameter for flexibility
tests/store/conftest.py Added parameterized store_fixture and placeholder sql_store fixture to support multiple store implementations
Comments suppressed due to low confidence (1)

tests/store/conftest.py:15

  • The __all__ list should be updated to include the new fixtures store_fixture and sql_store since they are now part of the module's public API.
__all__ = [
    "inmemory_store",
    "mock_readable_span",
]

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.



@pytest.fixture
def sql_store():
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sql_store fixture lacks a docstring explaining its purpose as a placeholder. Consider adding a docstring like \"\"\"Placeholder fixture for SQL store implementation. Returns None until SQL store is ready.\"\"\".

Suggested change
def sql_store():
def sql_store():
"""Placeholder fixture for SQL store implementation. Returns None until SQL store is ready."""

Copilot uses AI. Check for mistakes.
# Uncomment this when sql store is ready
# @pytest.fixture(params=["inmemory_store", "sql_store"])
@pytest.fixture(params=["inmemory_store"])
def store_fixture(request: FixtureRequest):
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The store_fixture function lacks a docstring. Consider adding documentation explaining its purpose as a parameterized fixture that enables testing across multiple store implementations, e.g., \"\"\"Parameterized fixture that provides different store implementations for testing. Currently supports InMemoryLightningStore, with SQL store support planned.\"\"\".

Suggested change
def store_fixture(request: FixtureRequest):
def store_fixture(request: FixtureRequest):
"""
Parameterized fixture that provides different store implementations for testing.
Currently supports InMemoryLightningStore, with SQL store support planned.
"""

Copilot uses AI. Check for mistakes.
# Uncomment this when sql store is ready
# @pytest.fixture(params=["inmemory_store", "sql_store"])
@pytest.fixture(params=["inmemory_store"])
def store_fixture(request: FixtureRequest):
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a type annotation for the return type of store_fixture. It should return LightningStore to match the type used throughout the test file.

Suggested change
def store_fixture(request: FixtureRequest):
def store_fixture(request: FixtureRequest) -> InMemoryLightningStore:

Copilot uses AI. Check for mistakes.
@ultmaster
Copy link
Contributor Author

/ci

@github-actions
Copy link

github-actions bot commented Nov 5, 2025

🚀 CI Watcher for correlation id-3491869159-mhm5dqe4 triggered by comment 3491869159
🏃‍♀️ Tracking 6 workflow run(s):

✅ All runs completed.

@ultmaster ultmaster merged commit 3f8a3ac into main Nov 5, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants