Skip to content

Commit ebdf822

Browse files
committed
Add some comments to docs
1 parent f980e12 commit ebdf822

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/unit/test_client_pagination.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464

6565

6666
def create_items(start: int, end: int) -> list[dict[str, int]]:
67+
"""Create list of test items of specified range."""
6768
step = -1 if end < start else 1
6869
return [{'id': i, 'key': i} for i in range(start, end, step)]
6970

@@ -111,6 +112,7 @@ def mocked_api_pagination_logic(*_: Any, **kwargs: Any) -> dict:
111112

112113
@dataclasses.dataclass
113114
class TestCase:
115+
"""Class representing a single test case for pagination tests."""
114116
id: str
115117
inputs: dict
116118
expected_items: list[dict[str, int]]
@@ -120,6 +122,7 @@ def __hash__(self) -> int:
120122
return hash(self.id)
121123

122124
def supports(self, client: BaseClient | BaseClientAsync) -> bool:
125+
"""Check whether the given client implements functionality tested by this test."""
123126
return client.__class__.__name__.replace('Async', '') in self.supported_clients
124127

125128

@@ -186,7 +189,11 @@ def supports(self, client: BaseClient | BaseClientAsync) -> bool:
186189
def generate_test_params(
187190
client_set: Literal['collection', 'kvs', 'rq', 'dataset'], *, async_clients: bool = False
188191
) -> list[ParameterSet]:
189-
# Different clients support different options and thus different scenarios
192+
"""Generate list of ParameterSets for parametrized tests.
193+
194+
Different clients support different options and thus different scenarios.
195+
"""
196+
190197
client = ApifyClientAsync(token='') if async_clients else ApifyClient(token='')
191198

192199
clients: set[BaseClient | BaseClientAsync]

0 commit comments

Comments
 (0)