File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,10 +17,10 @@ def test_gpio_library_available():
1717
1818#Test 2: confirm pins can switch HIGH/ LOW
1919def test_gpio_high_low ():
20+
2021 test_pin = 17
2122 GPIO .setup (test_pin , GPIO .OUT )
2223
23-
2424 GPIO .output (test_pin , GPIO .HIGH )
2525 time .sleep (0.1 )
2626 assert GPIO .input (test_pin ) == GPIO .HIGH
@@ -29,7 +29,6 @@ def test_gpio_high_low():
2929 time .sleep (0.1 )
3030 assert GPIO .input (test_pin ) == GPIO .LOW
3131
32- # GPIO.cleanup()
3332
3433#Test 3: confirm you can read a state -> Loopback
3534def test_gpio_loopback ():
@@ -40,19 +39,16 @@ def test_gpio_loopback():
4039 GPIO .setup (out_pin , GPIO .OUT )
4140 GPIO .setup (in_pin , GPIO .IN )
4241
43- GPIO .input (in_pin ) == GPIO .HIGH
44- time .sleep (0.1 )
4542 GPIO .output (out_pin , GPIO .HIGH )
43+ time .sleep (0.1 )
4644 assert GPIO .input (in_pin ) == GPIO .HIGH
4745
48- GPIO .input (in_pin ) == GPIO .LOW
49- time .sleep (0.1 )
5046 GPIO .output (out_pin , GPIO .LOW )
47+ time .sleep (0.1 )
5148 assert GPIO .input (in_pin ) == GPIO .LOW
5249
53- # GPIO.cleanup()
5450
5551#Test 4: CAN FD HAT specific GPIO test
5652@pytest .mark .skip ("Requires CAN FD HAT" )
5753def test_can_hat_gpio ():
58- pass
54+ pass
You can’t perform that action at this time.
0 commit comments