File tree 4 files changed +34
-2
lines changed
4 files changed +34
-2
lines changed Original file line number Diff line number Diff line change
1
+ import logging
2
+
1
3
def test_gpio (dut ):
4
+ LOGGER = logging .getLogger (__name__ )
5
+
2
6
dut .expect_exact ("Button test" )
7
+
8
+ LOGGER .info ("Expecting button press 1" )
3
9
dut .expect_exact ("Button pressed 1 times" )
10
+
11
+ LOGGER .info ("Expecting button press 2" )
4
12
dut .expect_exact ("Button pressed 2 times" )
13
+
14
+ LOGGER .info ("Expecting button press 3" )
5
15
dut .expect_exact ("Button pressed 3 times" )
Original file line number Diff line number Diff line change
1
+ import logging
2
+
1
3
def test_nvs (dut ):
4
+ LOGGER = logging .getLogger (__name__ )
5
+
6
+ LOGGER .info ("Expecting counter value 0" )
2
7
dut .expect_exact ("Current counter value: 0" )
8
+
9
+ LOGGER .info ("Expecting counter value 1" )
3
10
dut .expect_exact ("Current counter value: 1" )
11
+
12
+ LOGGER .info ("Expecting counter value 2" )
4
13
dut .expect_exact ("Current counter value: 2" )
Original file line number Diff line number Diff line change
1
+ import logging
2
+
1
3
def test_periman (dut ):
4
+ LOGGER = logging .getLogger (__name__ )
2
5
peripherals = [
3
6
"GPIO" ,
4
7
"SigmaDelta" ,
@@ -29,9 +32,10 @@ def test_periman(dut):
29
32
30
33
if peripheral in peripherals :
31
34
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 } " )
33
37
peripherals .remove (peripheral )
34
38
else :
35
39
assert False , f"Unknown peripheral: { peripheral } "
36
40
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
+
1
3
def test_wifi (dut ):
4
+ LOGGER = logging .getLogger (__name__ )
5
+
6
+ LOGGER .info ("Starting WiFi Scan" )
2
7
dut .expect_exact ("Scan start" )
3
8
dut .expect_exact ("Scan done" )
4
9
dut .expect_exact ("Wokwi-GUEST" )
10
+ LOGGER .info ("WiFi Scan done" )
11
+
12
+ LOGGER .info ("Connecting to WiFi" )
5
13
dut .expect_exact ("WiFi connected" )
6
14
dut .expect_exact ("IP address:" )
15
+ LOGGER .info ("WiFi connected" )
You can’t perform that action at this time.
0 commit comments