Skip to content

refactor(test): Format long strings in expect_exact calls for better …

Sign in for the full log view
GitHub Actions / Test Results failed Jun 23, 2025 in 0s

1 fail, 42 pass in 48m 19s

144 files  144 suites   48m 19s ⏱️
 43 tests  42 ✅ 0 💤  1 ❌
443 runs  422 ✅ 0 💤 21 ❌

Results for commit 13aac76.

Annotations

Check warning on line 0 in validation.nvs.test_nvs

See this annotation in the file changed.

@github-actions github-actions / Test Results

21 out of 42 runs failed: test_nvs (validation.nvs.test_nvs)

./artifacts/tests-results-wokwi-esp32-validation/validation/nvs/esp32/nvs0.xml [took 30s]
./artifacts/tests-results-wokwi-esp32-validation/validation/nvs/esp32/nvs1.xml [took 30s]
./artifacts/tests-results-wokwi-esp32c3-validation/validation/nvs/esp32c3/nvs0.xml [took 30s]
./artifacts/tests-results-wokwi-esp32c3-validation/validation/nvs/esp32c3/nvs1.xml [took 30s]
./artifacts/tests-results-wokwi-esp32c6-validation/validation/nvs/esp32c6/nvs0.xml [took 30s]
./artifacts/tests-results-wokwi-esp32c6-validation/validation/nvs/esp32c6/nvs1.xml [took 30s]
./artifacts/tests-results-wokwi-esp32c6-validation/validation/nvs/esp32c6/nvs2.xml [took 30s]
./artifacts/tests-results-wokwi-esp32c6-validation/validation/nvs/esp32c6/nvs3.xml [took 30s]
./artifacts/tests-results-wokwi-esp32h2-validation/validation/nvs/esp32h2/nvs0.xml [took 30s]
./artifacts/tests-results-wokwi-esp32h2-validation/validation/nvs/esp32h2/nvs1.xml [took 30s]
./artifacts/tests-results-wokwi-esp32h2-validation/validation/nvs/esp32h2/nvs2.xml [took 30s]
./artifacts/tests-results-wokwi-esp32h2-validation/validation/nvs/esp32h2/nvs3.xml [took 30s]
./artifacts/tests-results-wokwi-esp32p4-validation/validation/nvs/esp32p4/nvs0.xml [took 30s]
./artifacts/tests-results-wokwi-esp32p4-validation/validation/nvs/esp32p4/nvs1.xml [took 30s]
./artifacts/tests-results-wokwi-esp32p4-validation/validation/nvs/esp32p4/nvs2.xml [took 30s]
./artifacts/tests-results-wokwi-esp32p4-validation/validation/nvs/esp32p4/nvs3.xml [took 30s]
./artifacts/tests-results-wokwi-esp32s2-validation/validation/nvs/esp32s2/nvs0.xml [took 30s]
./artifacts/tests-results-wokwi-esp32s2-validation/validation/nvs/esp32s2/nvs1.xml [took 30s]
./artifacts/tests-results-wokwi-esp32s3-validation/validation/nvs/esp32s3/nvs0.xml [took 30s]
./artifacts/tests-results-wokwi-esp32s3-validation/validation/nvs/esp32s3/nvs1.xml [took 30s]
./artifacts/tests-results-wokwi-esp32s3-validation/validation/nvs/esp32s3/nvs2.xml [took 30s]
Raw output
pexpect.exceptions.TIMEOUT: Not found "Current counter value: 0"
Bytes in current buffer (color code eliminated): struct: {id:5,val:140}
Please check the full log here: /tmp/pytest-embedded/2025-06-23_06-41-21-327600/test_nvs/dut.log
self = <pytest_embedded_wokwi.dut.WokwiDut object at 0x7fbc9abf38c0>
pattern = 'Current counter value: 0', expect_all = False, not_matching = ()
args = (), kwargs = {}, patterns = ['Current counter value: 0'], res = []
debug_str = 'Not found "Current counter value: 0"\nBytes in current buffer (color code eliminated): struct: {id:5,val:140}\nPlease check the full log here: /tmp/pytest-embedded/2025-06-23_06-41-21-327600/test_nvs/dut.log'

    @functools.wraps(func)
    def wrapper(
        self, pattern, *args, expect_all: bool = False, not_matching: List[Union[str, re.Pattern]] = (), **kwargs
    ) -> Union[Union[Match, AnyStr], List[Union[Match, AnyStr]]]:
        patterns = to_list(pattern)
        res = []
        while patterns:
            try:
>               index = func(self, pattern, *args, **kwargs)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

/opt/hostedtoolcache/Python/3.13.5/x64/lib/python3.13/site-packages/pytest_embedded/dut.py:76: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/hostedtoolcache/Python/3.13.5/x64/lib/python3.13/site-packages/pytest_embedded/dut.py:153: in expect_exact
    return self.pexpect_proc.expect_exact(pattern, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.5/x64/lib/python3.13/site-packages/pexpect/spawnbase.py:432: in expect_exact
    return exp.expect_loop(timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.5/x64/lib/python3.13/site-packages/pexpect/expect.py:181: in expect_loop
    return self.timeout(e)
           ^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pexpect.expect.Expecter object at 0x7fbc9ac781a0>
err = TIMEOUT("<pytest_embedded.log.PexpectProcess object at 0x7fbc9abf2e40>\nsearcher: searcher_string:\n    0: b'Current counter value: 0'")

    def timeout(self, err=None):
        spawn = self.spawn
    
        spawn.before = spawn._before.getvalue()
        spawn.after = TIMEOUT
        index = self.searcher.timeout_index
        if index >= 0:
            spawn.match = TIMEOUT
            spawn.match_index = index
            return index
        else:
            spawn.match = None
            spawn.match_index = None
            msg = str(spawn)
            msg += '\nsearcher: %s' % self.searcher
            if err is not None:
                msg = str(err) + '\n' + msg
    
            exc = TIMEOUT(msg)
            exc.__cause__ = None    # in Python 3.x we can use "raise exc from None"
>           raise exc
E           pexpect.exceptions.TIMEOUT: <pytest_embedded.log.PexpectProcess object at 0x7fbc9abf2e40>
E           searcher: searcher_string:
E               0: b'Current counter value: 0'
E           <pytest_embedded.log.PexpectProcess object at 0x7fbc9abf2e40>
E           searcher: searcher_string:
E               0: b'Current counter value: 0'

/opt/hostedtoolcache/Python/3.13.5/x64/lib/python3.13/site-packages/pexpect/expect.py:144: TIMEOUT

The above exception was the direct cause of the following exception:

dut = <pytest_embedded_wokwi.dut.WokwiDut object at 0x7fbc9abf38c0>

    def test_nvs(dut):
        LOGGER = logging.getLogger(__name__)
    
        LOGGER.info("Expecting counter value 0")
>       dut.expect_exact("Current counter value: 0")

tests/validation/nvs/test_nvs.py:8: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_embedded_wokwi.dut.WokwiDut object at 0x7fbc9abf38c0>
pattern = 'Current counter value: 0', expect_all = False, not_matching = ()
args = (), kwargs = {}, patterns = ['Current counter value: 0'], res = []
debug_str = 'Not found "Current counter value: 0"\nBytes in current buffer (color code eliminated): struct: {id:5,val:140}\nPlease check the full log here: /tmp/pytest-embedded/2025-06-23_06-41-21-327600/test_nvs/dut.log'

    @functools.wraps(func)
    def wrapper(
        self, pattern, *args, expect_all: bool = False, not_matching: List[Union[str, re.Pattern]] = (), **kwargs
    ) -> Union[Union[Match, AnyStr], List[Union[Match, AnyStr]]]:
        patterns = to_list(pattern)
        res = []
        while patterns:
            try:
                index = func(self, pattern, *args, **kwargs)
            except (pexpect.EOF, pexpect.TIMEOUT) as e:
                debug_str = (
                    f'Not found "{pattern!s}"\n'
                    f'Bytes in current buffer (color code eliminated): {self.pexpect_proc.buffer_debug_str}\n'
                    f'Please check the full log here: {self.logfile}'
                )
>               raise e.__class__(debug_str) from e
E               pexpect.exceptions.TIMEOUT: Not found "Current counter value: 0"
E               Bytes in current buffer (color code eliminated): struct: {id:5,val:140}
E               Please check the full log here: /tmp/pytest-embedded/2025-06-23_06-41-21-327600/test_nvs/dut.log

/opt/hostedtoolcache/Python/3.13.5/x64/lib/python3.13/site-packages/pytest_embedded/dut.py:83: TIMEOUT

Check notice on line 0 in .github

See this annotation in the file changed.

@github-actions github-actions / Test Results

43 tests found

There are 43 tests, see "Raw output" for the full list of tests.
Raw output
auto_baudrate_test
basic_transmission_test
begin_when_running_test
change_baudrate_test
change_clock
change_cpu_frequency_test
change_pins_test
disabled_uart_calls_test
enabled_uart_calls_test
end_when_stopped_test
periman_test
psram_found
resize_buffers_test
rtc_run_clock
rtc_set_time
scan_bus
scan_bus_with_wifi
swap_pins
test_api
test_calloc_success
test_fail
test_malloc_fail
test_malloc_success
test_memcpy
test_memset_all_ones
test_memset_all_zeroes
test_memset_alternating
test_memset_random
test_pass
test_realloc_success
test_touch_errors
test_touch_interrtupt
test_touch_read
timer_clock_select_test
timer_divider_test
timer_interrupt_test
timer_read_test
validation.democfg.test_democfg ‑ test_cfg
validation.gpio.test_gpio ‑ test_gpio
validation.hello_world.test_hello_world ‑ test_hello_world
validation.nvs.test_nvs ‑ test_nvs
validation.periman.test_periman ‑ test_periman
validation.wifi.test_wifi ‑ test_wifi