1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 03:12:20 +01:00

Add pytest to CI (#1138)

This commit is contained in:
Otto Winter
2020-07-15 14:00:02 +02:00
committed by GitHub
parent a20e71b32a
commit d5c59292c8
7 changed files with 120 additions and 39 deletions

View File

@@ -459,7 +459,6 @@ class TestEsphomeCore:
target.config_path = "foo/config"
return target
@pytest.mark.xfail(reason="raw_config and config differ, should they?")
def test_reset(self, target):
"""Call reset on target and compare to new instance"""
other = core.EsphomeCore()
@@ -469,15 +468,18 @@ class TestEsphomeCore:
assert target.__dict__ == other.__dict__
def test_address__none(self, target):
target.config = {}
assert target.address is None
def test_address__wifi(self, target):
target.config = {}
target.config[const.CONF_WIFI] = {const.CONF_USE_ADDRESS: "1.2.3.4"}
target.config["ethernet"] = {const.CONF_USE_ADDRESS: "4.3.2.1"}
assert target.address == "1.2.3.4"
def test_address__ethernet(self, target):
target.config = {}
target.config["ethernet"] = {const.CONF_USE_ADDRESS: "4.3.2.1"}
assert target.address == "4.3.2.1"

View File

@@ -94,7 +94,6 @@ class Test_lookup_pin:
assert actual == expected
@pytest.mark.xfail(reason="This may be expected")
def test_valid_32_pin_alias(self, core_esp32):
core_esp32.board = MOCK_ESP32_BOARD_ALIAS_ID