Use TestCase.addCleanup (#36560)
This commit is contained in:
parent
85ba29012f
commit
c33edbe5bb
103 changed files with 179 additions and 254 deletions
|
@ -42,10 +42,7 @@ class TestFeedreaderComponent(unittest.TestCase):
|
|||
data_file = self.hass.config.path(f"{feedreader.DOMAIN}.pickle")
|
||||
if exists(data_file):
|
||||
remove(data_file)
|
||||
|
||||
def tearDown(self):
|
||||
"""Stop everything that was started."""
|
||||
self.hass.stop()
|
||||
self.addCleanup(self.hass.stop)
|
||||
|
||||
def test_setup_one_feed(self):
|
||||
"""Test the general setup of this component."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue