Skip to content

Commit cc47ced

Browse files
committed
fix docs
1 parent 7e02187 commit cc47ced

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

context_async_sqlalchemy/test_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ async def set_test_context(auto_close: bool = False) -> AsyncGenerator[None]:
3333
Opens a context similar to middleware.
3434
3535
Use auto_close=False if you’re using a test session and transaction
36-
that you close manually elsewhere in your code.
36+
that you close elsewhere in your code.
3737
38-
Use auto_close=True if, for example, you want to call a
39-
function in a test that uses a context bypassing the
40-
middleware, and you want all sessions to be closed automatically.
38+
Use auto_close=True if you want to call a function
39+
in a test that uses a context while the middleware is not
40+
active, and you want all sessions to be closed automatically.
4141
"""
4242
token = init_db_session_ctx()
4343
try:

docs/api/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,10 +394,10 @@ <h3 id="set_test_context">set_test_context</h3>
394394
It’s intended for use in tests where the test and the application share
395395
a single transaction.</p>
396396
<p>Use <code>auto_close=False</code> if you’re using a test session and transaction
397-
that you close manually elsewhere in your code.</p>
398-
<p>Use <code>auto_close=True</code> if, for example, you want to call a
399-
function in a test that uses a context bypassing the
400-
middleware, and you want all sessions to be closed automatically.</p>
397+
that you close elsewhere in your code.</p>
398+
<p>Use <code>auto_close=True</code> if you want to call a function
399+
in a test that uses a context while the middleware is not
400+
active, and you want all sessions to be closed automatically.</p>
401401
<hr />
402402
<h3 id="put_savepoint_session_in_ctx">put_savepoint_session_in_ctx</h3>
403403
<pre><code class="language-python">async def put_savepoint_session_in_ctx(

docs_sources/docs/api.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,11 +325,11 @@ It’s intended for use in tests where the test and the application share
325325
a single transaction.
326326

327327
Use `auto_close=False` if you’re using a test session and transaction
328-
that you close manually elsewhere in your code.
328+
that you close elsewhere in your code.
329329

330-
Use `auto_close=True` if, for example, you want to call a
331-
function in a test that uses a context bypassing the
332-
middleware, and you want all sessions to be closed automatically.
330+
Use `auto_close=True` if you want to call a function
331+
in a test that uses a context while the middleware is not
332+
active, and you want all sessions to be closed automatically.
333333

334334
---
335335

0 commit comments

Comments
 (0)