Skip to content

Conversation

@Cito
Copy link
Member

@Cito Cito commented Jan 20, 2026

This is part 2 of the provider test refactoring.

We use a shared module to hold test suites for all variants of the KV providers. The provider specific test modules then only need to contain provider specific fixtures and white box testing. This also guarantees that all provides share the same behavior.

@coveralls
Copy link

coveralls commented Jan 20, 2026

Pull Request Test Coverage Report for Build 21222309694

Details

  • 22 of 22 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 93.15%

Totals Coverage Status
Change from base Build 21167843311: 0.03%
Covered Lines: 3087
Relevant Lines: 3314

💛 - Coveralls

@Cito Cito requested a review from TheByronHimes January 20, 2026 15:35
TheByronHimes
TheByronHimes previously approved these changes Jan 21, 2026
Copy link
Member

@TheByronHimes TheByronHimes left a comment

Choose a reason for hiding this comment

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

This is a neat idea. Thanks for putting it together.

return dto_kvstore

@pytest.fixture()
def test_value(self) -> SimpleDto:
Copy link
Member

Choose a reason for hiding this comment

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

Should this be named something other than test_ to avoid confusion with the pytest naming convention?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, renamed it in ac24338.


from hexkit.custom_types import JsonObject
from hexkit.protocols.kvstore import KeyValueStoreProtocol

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
pytestmark = pytest.mark.asyncio()

Then you can remove all instances of @pytest.mark.asyncio below

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it's really worth it in this case. Done in 957eda7.

@Cito Cito requested a review from TheByronHimes January 21, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants