Skip to content

Commit add02ba

Browse files
committed
Fix generic assignment in tests
1 parent ffde28d commit add02ba

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

tests/test_store/test_logging.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ class StoreKwargs(TypedDict):
2222

2323

2424
class TestLoggingStore(StoreTests[LoggingStore[LocalStore], cpu.Buffer]):
25-
store_cls = LoggingStore[LocalStore]
25+
# store_cls is needed to do an isintsance check, so can't be a subscripted generic
26+
store_cls = LoggingStore # type: ignore[assignment]
2627
buffer_cls = cpu.Buffer
2728

2829
async def get(self, store: LoggingStore[LocalStore], key: str) -> Buffer:
@@ -49,9 +50,6 @@ def store(self, store_kwargs: StoreKwargs) -> LoggingStore[LocalStore]:
4950
def test_store_supports_writes(self, store: LoggingStore[LocalStore]) -> None:
5051
assert store.supports_writes
5152

52-
def test_store_supports_partial_writes(self, store: LoggingStore[LocalStore]) -> None:
53-
assert store.supports_partial_writes
54-
5553
def test_store_supports_listing(self, store: LoggingStore[LocalStore]) -> None:
5654
assert store.supports_listing
5755

tests/test_store/test_object.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ class StoreKwargs(TypedDict):
2323

2424

2525
class TestObjectStore(StoreTests[ObjectStore[LocalStore], cpu.Buffer]):
26-
store_cls = ObjectStore[LocalStore]
26+
# store_cls is needed to do an isintsance check, so can't be a subscripted generic
27+
store_cls = ObjectStore # type: ignore[assignment]
2728
buffer_cls = cpu.Buffer
2829

2930
@pytest.fixture

tests/test_store/test_wrapper.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ def open_kwargs(self, tmp_path: Path) -> OpenKwargs:
5454
def test_store_supports_writes(self, store: WrapperStore[LocalStore]) -> None:
5555
assert store.supports_writes
5656

57-
def test_store_supports_partial_writes(self, store: WrapperStore[LocalStore]) -> None:
58-
assert store.supports_partial_writes
59-
6057
def test_store_supports_listing(self, store: WrapperStore[LocalStore]) -> None:
6158
assert store.supports_listing
6259

0 commit comments

Comments
 (0)