]> Repositories - Adafruit_Blinka-hackapet.git/blobdiff - test/src/testing/universal/i2c.py
Updated pylint config and linted everything
[Adafruit_Blinka-hackapet.git] / test / src / testing / universal / i2c.py
index 184fee4021e80925f3772d56d80de17051486f89..b30a9458d6caed466f4c87f5a66d27924126950b 100644 (file)
@@ -1,3 +1,6 @@
+# SPDX-FileCopyrightText: 2021 Melissa LeBlanc-Williams for Adafruit Industries
+#
+# SPDX-License-Identifier: MIT
 import gc
 from testing import yes_no
 
@@ -12,7 +15,6 @@ gc.collect()
 
 class TestBME280Interactive(TestCase):
     def test_read_value(self):
-
         import board
 
         gc.collect()
@@ -66,7 +68,7 @@ class TestMMA8451Interactive(TestCase):
         sensor = adafruit_mma8451.MMA8451(i2c)
 
         x, y, z = sensor.acceleration
-        absolute = math.sqrt(x ** 2 + y ** 2 + z ** 2)
+        absolute = math.sqrt(x**2 + y**2 + z**2)
         self.assertTrue(9 <= absolute <= 11, "Not earth gravity")
 
         orientation = sensor.orientation