Zachary Ware <> added the comment:

1. I'm still -1 on a separate subclass, especially since the subclass should 
still be compatible with the base class.

2. This is only in consideration for 3.8 (even 3.7 is past feature freeze at 
this point), so the version-dependent behavior is unnecessary.

3. I agree that the `super().setUp()` idiom precludes allowing `setUp` and 
`tearDown` to be synchronous or asynchronous unless the idiom becomes 
`self.runMethod(super().setUp)`, but that's longer and harder to remember.  
`setUpClass` and `tearDownClass` also need to be considered.

You also still need to add tests.

`addCleanup` is an open question; I think it could handle sync or async on its 
own but could be convinced otherwise.

Andrew: Judging by your questions in msg313481 I think my description of 
`coroutine_runner` was not specific enough.  The basic idea is that is defined with `coroutine_runner =`, and if 
you need something else then you do:

class MyTest(TestCase):

    # I assume trio has something like this :)
    coroutine_runner =

    async def test_something_in_trio(self):

asyncio gets the special treatment of having its runner set by default by 
virtue of being in the standard library.

I'm certainly open to better naming :)


Python tracker <>
Python-bugs-list mailing list

Reply via email to