MCPcopy
hub / github.com/django/django / runner

Method runner

tests/backends/tests.py:798–809  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

796 connections_dict[id(connection)] = connection
797
798 def runner():
799 # Passing django.db.connection between threads doesn't work while
800 # connections[DEFAULT_DB_ALIAS] does.
801 from django.db import connections
802
803 connection = connections[DEFAULT_DB_ALIAS]
804 # Allow thread sharing so the connection can be closed by the
805 # main thread.
806 connection.inc_thread_sharing()
807 with connection.cursor():
808 pass
809 connections_dict[id(connection)] = connection
810
811 try:
812 for x in range(2):

Callers

nothing calls this directly

Calls 5

inc_thread_sharingMethod · 0.80
cursorMethod · 0.80
allMethod · 0.45
getMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected