mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
partition_table: add a test for total partition size error
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
from __future__ import division, print_function
|
||||
|
||||
import io
|
||||
|
@@ -1,4 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
from __future__ import division, print_function
|
||||
|
||||
import csv
|
||||
@@ -467,6 +469,14 @@ ota_1, 0, ota_1, , 1M,
|
||||
finally:
|
||||
sys.stderr = sys.__stderr__
|
||||
|
||||
def test_size_error(self):
|
||||
csv_txt = """
|
||||
factory, app, factory, 0x10000, 20M
|
||||
"""
|
||||
with self.assertRaisesRegex(gen_esp32part.InputError, r'does not fit'):
|
||||
t = gen_esp32part.PartitionTable.from_csv(csv_txt)
|
||||
t.verify_size_fits(16 * 1024 * 1024)
|
||||
|
||||
|
||||
class PartToolTests(Py23TestCase):
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
import unittest
|
||||
|
||||
try:
|
||||
|
Reference in New Issue
Block a user