]> Repositories - hackapet/Adafruit_Blinka.git/blobdiff - tests/test_generic_agnostic_board_analogio.py
linten more
[hackapet/Adafruit_Blinka.git] / tests / test_generic_agnostic_board_analogio.py
index 07c8424ced2039613d0f7385047830b3fea2a586..b48a383fa34359e0cad939b4b204d573f1b6611b 100644 (file)
@@ -1,10 +1,11 @@
 # SPDX-FileCopyrightText: 2024 Brent Rubell for Adafruit Industries
 #
 # SPDX-License-Identifier: MIT
-import pytest
+import pytest # pylint: disable=unused-import
 import board
 import analogio
 
+
 # Analog Outputs
 def test_Ax_OUTPUT():
     """Test analog output pin functionality."""
@@ -99,12 +100,11 @@ def test_Ax_INPUT_WAVE_SINE():
     pin_sine_wave = analogio.AnalogIn(board.Ax_INPUT_WAVE_SINE)
 
     # Run through the sine wave once
-    for i, expected_value in enumerate(sine_wave):
+    for expected_value in sine_wave:
         assert pin_sine_wave.value == expected_value
 
-
     # Run through the sine wave again to ensure it loops back correctly
-    for i, expected_value in enumerate(sine_wave):
+    for expected_value in sine_wave:
         assert pin_sine_wave.value == expected_value
 
     pin_sine_wave.deinit()
@@ -116,12 +116,11 @@ def test_Ax_INPUT_WAVE_SAW():
     pin_saw_wave = analogio.AnalogIn(board.Ax_INPUT_WAVE_SAW)
 
     # Run through the sine wave once
-    for i in range(len(sawtooth_wave)):
-        assert pin_saw_wave.value == sawtooth_wave[i]
+    for expected_value in sawtooth_wave:
+        assert pin_saw_wave.value == expected_value
 
     # Run through the sine wave again to ensure it loops back correctly
-    for i in range(len(sawtooth_wave)):
-        assert pin_saw_wave.value == sawtooth_wave[i]
-
+    for expected_value in sawtooth_wave:
+        assert pin_saw_wave.value == expected_value
 
     pin_saw_wave.deinit()