ci: Relax a check in pytest_gptimer_example

This commit is contained in:
KonstantinKondrashov
2023-05-17 23:30:35 +08:00
parent b605404b06
commit ce602a36f9

View File

@ -30,7 +30,7 @@ def test_gptimer_example(dut: Dut) -> None:
for i in range(1,5):
res = dut.expect(r'Timer alarmed, count=(\d+)', timeout=5)
alarm_count = res.group(1).decode('utf8')
assert (i * 1000000 - 10) < int(alarm_count) < (i * 1000000 + 10)
assert (i * 1000000 - 20) < int(alarm_count) < (i * 1000000 + 20)
dut.expect_exact('Stop timer')
dut.expect_exact('Delete timer')