Skip to content

Commit c0ea74a

Browse files
committed
feat(test_esptool): Added test for embedded and detected flash size match
1 parent b8dd74d commit c0ea74a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/test_esptool.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,22 @@ def test_flash_id_trace(self):
778778
assert "Manufacturer:" in res
779779
assert "Device:" in res
780780

781+
@pytest.mark.quick_test
782+
@pytest.mark.skipif(
783+
arg_chip not in ["esp32c2"],
784+
reason="This test make sense only for EPS32-C2",
785+
)
786+
def test_flash_size(self):
787+
"""Test ESP32-C2 efuse block for flash size feature"""
788+
# ESP32-C2 class inherits methods from ESP32-C3 class
789+
# but it does not have the same amount of efuse blocks
790+
# the methods are overwritten
791+
# in case anything changes this test will fail to remind us
792+
res = self.run_esptool("flash_id")
793+
lines = res.splitlines()
794+
for line in lines:
795+
assert "embedded flash" not in line.lower()
796+
781797

782798
@pytest.mark.skipif(
783799
os.getenv("ESPTOOL_TEST_SPI_CONN") is None, reason="Needs external flash"

0 commit comments

Comments
 (0)