Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: ts_auxiliary_telescope
-
Labels:None
-
Story Points:1
-
Sprint:TSSW Sprint - Sep 2 - Sep 14
-
Team:Telescope and Site
Description
Please add the https://github.com/Martiusweb/asynctest package to Docker containers used for Python T&S software. This adds some useful support to unittest, including the ability to write asynchronous test cases directly, e.g.:
async def test_foo(self):
|
# code
|
instead of
def test_foo(self):
|
async def doit(self):
|
# code
|
|
asyncio.get_event_loop().run_until_complete(doit())
|
(which silently does nothing if one forgets the event loop call)
For my own testing I've pip installed asynctest, and have been using it to write tests for the spectrograph. I quite like it so far (although I may not actually need the mocking functionality right now after all).