mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-11 20:11:47 +00:00
Apparently tests can be async now.
This commit is contained in:
@ -29,7 +29,6 @@ from allmydata.util import yamlutil
|
|||||||
from allmydata.util import rrefutil
|
from allmydata.util import rrefutil
|
||||||
from allmydata.util.fileutil import EncryptedTemporaryFile
|
from allmydata.util.fileutil import EncryptedTemporaryFile
|
||||||
from allmydata.util.cputhreadpool import defer_to_thread
|
from allmydata.util.cputhreadpool import defer_to_thread
|
||||||
from allmydata.util.deferredutil import async_to_deferred
|
|
||||||
from allmydata.test.common_util import ReallyEqualMixin
|
from allmydata.test.common_util import ReallyEqualMixin
|
||||||
from .no_network import fireNow, LocalWrapper
|
from .no_network import fireNow, LocalWrapper
|
||||||
|
|
||||||
@ -597,7 +596,6 @@ class RrefUtilTests(unittest.TestCase):
|
|||||||
class CPUThreadPool(unittest.TestCase):
|
class CPUThreadPool(unittest.TestCase):
|
||||||
"""Tests for cputhreadpool."""
|
"""Tests for cputhreadpool."""
|
||||||
|
|
||||||
@async_to_deferred
|
|
||||||
async def test_runs_in_thread(self):
|
async def test_runs_in_thread(self):
|
||||||
"""The given function runs in a thread."""
|
"""The given function runs in a thread."""
|
||||||
def f(*args, **kwargs):
|
def f(*args, **kwargs):
|
||||||
|
Reference in New Issue
Block a user