[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2022-07-06 10:27:59 +00:00
parent e18d46c465
commit 14d1a5f6e5
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
# This has to be done first as Twisted is import-order-sensitive with reactors
import asyncio # isort:skip
import os # isort:skip
import os # isort:skip
import sys # isort:skip
import warnings # isort:skip
from concurrent.futures import ThreadPoolExecutor # isort:skip

View File

@ -258,10 +258,10 @@ class TestCLIInterface(TestCase):
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):
def test_default_executor(self):
from daphne.server import twisted_loop
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")))