MCPcopy
hub / github.com/django/django / _start_server_thread

Method _start_server_thread

django/test/testcases.py:1838–1852  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

1836
1837 @classmethod
1838 def _start_server_thread(cls):
1839 connections_override = cls._make_connections_override()
1840 for conn in connections_override.values():
1841 # Explicitly enable thread-shareability for this connection.
1842 conn.inc_thread_sharing()
1843
1844 cls.server_thread = cls._create_server_thread(connections_override)
1845 cls.server_thread.daemon = True
1846 cls.server_thread.start()
1847 cls.addClassCleanup(cls._terminate_thread)
1848
1849 # Wait for the live server to be ready
1850 cls.server_thread.is_ready.wait()
1851 if cls.server_thread.error:
1852 raise cls.server_thread.error
1853
1854 @classmethod
1855 def _create_server_thread(cls, connections_override):

Callers 3

setUpClassMethod · 0.80
test_port_bindMethod · 0.80

Calls 4

inc_thread_sharingMethod · 0.80
_create_server_threadMethod · 0.80
valuesMethod · 0.45

Tested by

no test coverage detected