File tree Expand file tree Collapse file tree 4 files changed +34
-2
lines changed
Expand file tree Collapse file tree 4 files changed +34
-2
lines changed Original file line number Diff line number Diff line change 1+ import logging
2+
13def test_gpio (dut ):
4+ LOGGER = logging .getLogger (__name__ )
5+
26 dut .expect_exact ("Button test" )
7+
8+ LOGGER .info ("Expecting button press 1" )
39 dut .expect_exact ("Button pressed 1 times" )
10+
11+ LOGGER .info ("Expecting button press 2" )
412 dut .expect_exact ("Button pressed 2 times" )
13+
14+ LOGGER .info ("Expecting button press 3" )
515 dut .expect_exact ("Button pressed 3 times" )
Original file line number Diff line number Diff line change 1+ import logging
2+
13def test_nvs (dut ):
4+ LOGGER = logging .getLogger (__name__ )
5+
6+ LOGGER .info ("Expecting counter value 0" )
27 dut .expect_exact ("Current counter value: 0" )
8+
9+ LOGGER .info ("Expecting counter value 1" )
310 dut .expect_exact ("Current counter value: 1" )
11+
12+ LOGGER .info ("Expecting counter value 2" )
413 dut .expect_exact ("Current counter value: 2" )
Original file line number Diff line number Diff line change 1+ import logging
2+
13def test_periman (dut ):
4+ LOGGER = logging .getLogger (__name__ )
25 peripherals = [
36 "GPIO" ,
47 "SigmaDelta" ,
@@ -29,9 +32,10 @@ def test_periman(dut):
2932
3033 if peripheral in peripherals :
3134 if "not" in console_output :
32- assert False , f"Peripheral { peripheral } printed when it should not"
35+ assert False , f"Output printed when it should not after peripheral { peripheral } "
36+ LOGGER .info (f"Correct output after peripheral: { peripheral } " )
3337 peripherals .remove (peripheral )
3438 else :
3539 assert False , f"Unknown peripheral: { peripheral } "
3640
37- assert peripherals == [], f"Missing peripherals output: { peripherals } "
41+ assert peripherals == [], f"Missing output after peripherals : { peripherals } "
Original file line number Diff line number Diff line change 1+ import logging
2+
13def test_wifi (dut ):
4+ LOGGER = logging .getLogger (__name__ )
5+
6+ LOGGER .info ("Starting WiFi Scan" )
27 dut .expect_exact ("Scan start" )
38 dut .expect_exact ("Scan done" )
49 dut .expect_exact ("Wokwi-GUEST" )
10+ LOGGER .info ("WiFi Scan done" )
11+
12+ LOGGER .info ("Connecting to WiFi" )
513 dut .expect_exact ("WiFi connected" )
614 dut .expect_exact ("IP address:" )
15+ LOGGER .info ("WiFi connected" )
You can’t perform that action at this time.
0 commit comments