mirror of
https://github.com/esphome/esphome.git
synced 2025-10-08 12:53:45 +01:00
review
This commit is contained in:
@@ -687,6 +687,14 @@ class TestEsphomeCore:
|
|||||||
expected = os.path.expanduser("~/.platformio/.cache")
|
expected = os.path.expanduser("~/.platformio/.cache")
|
||||||
assert target.platformio_cache_dir == expected
|
assert target.platformio_cache_dir == expected
|
||||||
|
|
||||||
|
def test_platformio_cache_dir_whitespace_env_var(self):
|
||||||
|
"""Test platformio_cache_dir with whitespace-only env var falls back to default."""
|
||||||
|
target = core.EsphomeCore()
|
||||||
|
|
||||||
|
with patch.dict(os.environ, {"PLATFORMIO_CACHE_DIR": " "}):
|
||||||
|
expected = os.path.expanduser("~/.platformio/.cache")
|
||||||
|
assert target.platformio_cache_dir == expected
|
||||||
|
|
||||||
def test_platformio_cache_dir_docker_addon_path(self):
|
def test_platformio_cache_dir_docker_addon_path(self):
|
||||||
"""Test platformio_cache_dir in Docker/HA addon environment."""
|
"""Test platformio_cache_dir in Docker/HA addon environment."""
|
||||||
target = core.EsphomeCore()
|
target = core.EsphomeCore()
|
||||||
|
Reference in New Issue
Block a user