This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Petter S
Recipients Petter S, asvetlov, njs, pdxjohnny, r.david.murray, yselivanov, zach.ware
Date 2018-03-08.19:04:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1520535840.94.0.467229070634.issue32972@psf.upfronthosting.co.za>
In-reply-to
Content
> 1. Do we need support for async versions of setUp, setUpClass, etc?  In my opinion: yes.

I completely agree. I would imagine many or most real-world tests requiring async setUp. There is also the question on how a custom loop etc. can be used in the unit test class.

How about this: unittest.TestCase gets a very small refactor in which a overridable helper method is used to run the test method. This helper method can then be changed to run async methods in a subclass AsyncioTestCase (that probably should live in asyncio).

Pull request 6005 contained such a helper method, but the async part could be implemented in the subclass instead.
History
Date User Action Args
2018-03-08 19:04:00Petter Ssetrecipients: + Petter S, r.david.murray, njs, asvetlov, zach.ware, yselivanov, pdxjohnny
2018-03-08 19:04:00Petter Ssetmessageid: <1520535840.94.0.467229070634.issue32972@psf.upfronthosting.co.za>
2018-03-08 19:04:00Petter Slinkissue32972 messages
2018-03-08 19:04:00Petter Screate