mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 02:37:08 +00:00
Clean up feedreader files at the end (#39064)
This commit is contained in:
parent
bb164bb32c
commit
fec4966ee0
@ -38,11 +38,14 @@ class TestFeedreaderComponent(unittest.TestCase):
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
"""Initialize values for this testcase class."""
|
"""Initialize values for this testcase class."""
|
||||||
self.hass = get_test_home_assistant()
|
self.hass = get_test_home_assistant()
|
||||||
# Delete any previously stored data
|
self.addCleanup(self.tear_down_cleanup)
|
||||||
|
|
||||||
|
def tear_down_cleanup(self):
|
||||||
|
"""Clean up files and stop Home Assistant."""
|
||||||
data_file = self.hass.config.path(f"{feedreader.DOMAIN}.pickle")
|
data_file = self.hass.config.path(f"{feedreader.DOMAIN}.pickle")
|
||||||
if exists(data_file):
|
if exists(data_file):
|
||||||
remove(data_file)
|
remove(data_file)
|
||||||
self.addCleanup(self.hass.stop)
|
self.hass.stop()
|
||||||
|
|
||||||
def test_setup_one_feed(self):
|
def test_setup_one_feed(self):
|
||||||
"""Test the general setup of this component."""
|
"""Test the general setup of this component."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user