@pytest.fixture
def hass(loop):
 hass = loop.run_until_complete(async_test_home_assistant(loop))
 (yield hass)
 loop.run_until_complete(hass.async_stop())

@ pytest . fixture def hass ( loop ) : hass = loop . run_until_complete ( async_test_home_assistant ( loop ) ) ( yield hass ) loop . run_until_complete ( hass . async_stop ( ) )
fixture to provide a test instance of hass .