[tahoe-lafs-trac-stream] [Tahoe-LAFS] #3886: It is inconvenient to test code using `async def` using Tahoe's unittest-based testing tools

Tahoe-LAFS trac at tahoe-lafs.org
Sat Apr 2 13:52:35 UTC 2022


#3886: It is inconvenient to test code using `async def` using Tahoe's unittest-
based testing tools
--------------------------------+---------------------------
 Reporter:  exarkun             |          Owner:
     Type:  enhancement         |         Status:  new
 Priority:  normal              |      Milestone:  undecided
Component:  dev-infrastructure  |        Version:  n/a
 Keywords:                      |  Launchpad Bug:
--------------------------------+---------------------------
 There are four base classes for test cases in `allmydata.test.common` -
 `SyncTestCase`, `AsyncTestCase`, `AsyncBrokenTestCase`, and
 `TrialTestCase`.

 None of these allow definition of a test using `async def` with the
 behavior you would expect (behavior analogous to what you get from
 `AsyncTestCase` and a test method returning a Deferred).

 As `async def` becomes the more popular way to define asynchronous
 functions and pervasive direct use of `Deferred` becomes less popular, it
 would probably be nice if it were at least as convenient to test with
 `async def` as it is with `Deferred`-returning functions.

--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3886>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list