File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments