mirror of
https://github.com/django/daphne.git
synced 2025-07-11 08:22:17 +03:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
e18d46c465
commit
14d1a5f6e5
|
@ -1,6 +1,6 @@
|
||||||
# This has to be done first as Twisted is import-order-sensitive with reactors
|
# This has to be done first as Twisted is import-order-sensitive with reactors
|
||||||
import asyncio # isort:skip
|
import asyncio # isort:skip
|
||||||
import os # isort:skip
|
import os # isort:skip
|
||||||
import sys # isort:skip
|
import sys # isort:skip
|
||||||
import warnings # isort:skip
|
import warnings # isort:skip
|
||||||
from concurrent.futures import ThreadPoolExecutor # isort:skip
|
from concurrent.futures import ThreadPoolExecutor # isort:skip
|
||||||
|
|
|
@ -258,10 +258,10 @@ class TestCLIInterface(TestCase):
|
||||||
self.assertCLI(["--no-server-name"], {"server_name": ""})
|
self.assertCLI(["--no-server-name"], {"server_name": ""})
|
||||||
|
|
||||||
|
|
||||||
@skipUnless(os.getenv('ASGI_THREADS'), "ASGI_THREADS environment variable not set.")
|
@skipUnless(os.getenv("ASGI_THREADS"), "ASGI_THREADS environment variable not set.")
|
||||||
class TestASGIThreads(TestCase):
|
class TestASGIThreads(TestCase):
|
||||||
def test_default_executor(self):
|
def test_default_executor(self):
|
||||||
from daphne.server import twisted_loop
|
from daphne.server import twisted_loop
|
||||||
|
|
||||||
executor = twisted_loop._default_executor
|
executor = twisted_loop._default_executor
|
||||||
self.assertEqual(executor._max_workers, int(os.getenv('ASGI_THREADS')))
|
self.assertEqual(executor._max_workers, int(os.getenv("ASGI_THREADS")))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user