Skip to content

Commit b524856

Browse files
committed
Add comment.
1 parent 9c72ad1 commit b524856

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tests/test_model_sync.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,33 @@
4949
from gel.abstract import Queryable, _T_ql
5050

5151

52+
# Model sync tests are run for both blocking and async clients.
53+
#
54+
# To implement this, tests in this file should not call self.client
55+
# directly. Instead, they call the corresponding function from
56+
# `TestBlockingModelSyncBase``.
57+
#
58+
# Test classes should derive from `TestBlockingModelSyncBase` and use the
59+
# `make_async_tests` to automatically create the async versions of the tests.
60+
#
61+
# The async test classes and functions will be created such that:
62+
#
63+
# @make_async_tests
64+
# class TestFoo(TestBlockingModelSyncBase):
65+
# async def test_foo_01(self):
66+
# ...
67+
#
68+
# will be create the async version:
69+
#
70+
# class TestAsyncFoo(TestAsyncModelSyncBase):
71+
# async def test_async_foo_01(self):
72+
# ...
73+
#
74+
# Both base classes (`TestBlockingModelSyncBase` and `TestAsyncModelSyncBase`)
75+
# wrap the client calls in an async function. When adding new functions,
76+
# ensure both classes have the same interface.
77+
78+
5279
# Helpers to replicate tests as both blocking and async
5380

5481

0 commit comments

Comments
 (0)