Skip to content

Commit 21165c4

Browse files
test: Setup for testing compatibility support
1 parent fa3e82c commit 21165c4

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import typing
2+
from src.thread import ParallelProcessing
3+
4+
5+
class DummyLengthOnly:
6+
length: int
7+
8+
def __init__(self, length: int):
9+
self.length = length
10+
11+
def __len__(self) -> int:
12+
return self.length
13+
14+
15+
class DummyGetOnly:
16+
dataset: list
17+
18+
def __init__(self, dataset: list):
19+
self.dataset = dataset
20+
21+
def __getitem__(self, i: int) -> typing.Any:
22+
return self.dataset[i]
23+
24+
25+
class DummyNonSequence(DummyLengthOnly, DummyGetOnly):
26+
length: int
27+
dataset: list
28+
29+
def __init__(self, length: int, dataset: list):
30+
DummyLengthOnly.__init__(self, length)
31+
DummyGetOnly.__init__(self, dataset)

0 commit comments

Comments
 (0)