mirror of
https://github.com/django/django.git
synced 2025-10-14 20:41:00 +00:00
Made small readability improvements.
This commit is contained in:
parent
4eb756793b
commit
302caa40e4
13 changed files with 52 additions and 62 deletions
|
@ -665,10 +665,9 @@ class ThreadTests(TransactionTestCase):
|
|||
# (the connection opened in the main thread will automatically be
|
||||
# closed on teardown).
|
||||
for conn in connections_dict.values():
|
||||
if conn is not connection:
|
||||
if conn.allow_thread_sharing:
|
||||
conn.close()
|
||||
conn.dec_thread_sharing()
|
||||
if conn is not connection and conn.allow_thread_sharing:
|
||||
conn.close()
|
||||
conn.dec_thread_sharing()
|
||||
|
||||
def test_connections_thread_local(self):
|
||||
"""
|
||||
|
@ -702,10 +701,9 @@ class ThreadTests(TransactionTestCase):
|
|||
# (the connection opened in the main thread will automatically be
|
||||
# closed on teardown).
|
||||
for conn in connections_dict.values():
|
||||
if conn is not connection:
|
||||
if conn.allow_thread_sharing:
|
||||
conn.close()
|
||||
conn.dec_thread_sharing()
|
||||
if conn is not connection and conn.allow_thread_sharing:
|
||||
conn.close()
|
||||
conn.dec_thread_sharing()
|
||||
|
||||
def test_pass_connection_between_threads(self):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue