Skip to content

Commit 2ad5d55

Browse files
committed
Updates to tests
1 parent fcdcda1 commit 2ad5d55

File tree

5 files changed

+8
-20
lines changed

5 files changed

+8
-20
lines changed

key-value/key-value-aio/tests/stores/keyring/test_keyring.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,5 @@ async def test_not_unbounded(self, store: BaseStore): ...
2727

2828
@override
2929
@pytest.mark.skipif(condition=detect_on_windows(), reason="Keyrings do not support large values on Windows")
30-
async def test_get_large_put_get(self, store: BaseStore, data: dict[str, Any], json: str):
31-
await store.put(collection="test", key="test", value=data)
32-
assert await store.get(collection="test", key="test") == data
30+
async def test_get_large_put_get(self, store: BaseStore, data: dict[str, Any], json: str, round_trip: dict[str, Any]): # pyright: ignore[reportUnusedParameter]
31+
await super().test_get_large_put_get(store, data, json, round_trip=data)

key-value/key-value-aio/tests/stores/windows_registry/test_windows_registry.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import TYPE_CHECKING, Any
1+
from typing import TYPE_CHECKING
22

33
import pytest
44
from typing_extensions import override
@@ -28,8 +28,3 @@ async def store(self) -> "WindowsRegistryStore":
2828
@override
2929
@pytest.mark.skip(reason="We do not test boundedness of registry stores")
3030
async def test_not_unbounded(self, store: BaseStore): ...
31-
32-
@override
33-
async def test_get_large_put_get(self, store: BaseStore, data: dict[str, Any], json: str):
34-
await store.put(collection="test", key="test", value=data)
35-
assert await store.get(collection="test", key="test") == data

key-value/key-value-shared/tests/utils/test_managed_entry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ def test_dump_to_json(data: dict[str, Any], json: str, round_trip: dict[str, Any
1414
assert dump_to_json(data) == json
1515

1616

17-
@SIMPLE_CASES.parametrize()
17+
@PositiveCases.parametrize(cases=SIMPLE_CASES)
1818
def test_load_from_json(data: dict[str, Any], json: str, round_trip: dict[str, Any]):
1919
assert load_from_json(json) == data
2020

2121

22-
@SIMPLE_CASES.parametrize()
22+
@PositiveCases.parametrize(cases=SIMPLE_CASES)
2323
def test_roundtrip_json(data: dict[str, Any], json: str, round_trip: dict[str, Any]):
2424
dumped_json: str = dump_to_json(data)
2525
assert dumped_json == json

key-value/key-value-sync/tests/code_gen/stores/keyring/test_keyring.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,5 @@ def test_not_unbounded(self, store: BaseStore): ...
3030

3131
@override
3232
@pytest.mark.skipif(condition=detect_on_windows(), reason="Keyrings do not support large values on Windows")
33-
def test_get_large_put_get(self, store: BaseStore, data: dict[str, Any], json: str):
34-
store.put(collection="test", key="test", value=data)
35-
assert store.get(collection="test", key="test") == data
33+
def test_get_large_put_get(self, store: BaseStore, data: dict[str, Any], json: str, round_trip: dict[str, Any]): # pyright: ignore[reportUnusedParameter]
34+
super().test_get_large_put_get(store, data, json, round_trip=data)

key-value/key-value-sync/tests/code_gen/stores/windows_registry/test_windows_registry.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# WARNING: this file is auto-generated by 'build_sync_library.py'
22
# from the original file 'test_windows_registry.py'
33
# DO NOT CHANGE! Change the original file instead.
4-
from typing import TYPE_CHECKING, Any
4+
from typing import TYPE_CHECKING
55

66
import pytest
77
from typing_extensions import override
@@ -31,8 +31,3 @@ def store(self) -> "WindowsRegistryStore":
3131
@override
3232
@pytest.mark.skip(reason="We do not test boundedness of registry stores")
3333
def test_not_unbounded(self, store: BaseStore): ...
34-
35-
@override
36-
def test_get_large_put_get(self, store: BaseStore, data: dict[str, Any], json: str):
37-
store.put(collection="test", key="test", value=data)
38-
assert store.get(collection="test", key="test") == data

0 commit comments

Comments
 (0)