-
Notifications
You must be signed in to change notification settings - Fork 0
Use shared test suites for KVStore providers (GSI-2093) #210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 21222309694Details
💛 - Coveralls |
TheByronHimes
left a comment
There was a problem hiding this 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: |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| pytestmark = pytest.mark.asyncio() |
Then you can remove all instances of @pytest.mark.asyncio below
There was a problem hiding this comment.
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.
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.