Просмотр исходного кода

Run black on test_device_config.py

Jason Rumney 2 лет назад
Родитель
Сommit
fe83c58d02
1 измененных файлов с 11 добавлено и 3 удалено
  1. 11 3
      tests/test_device_config.py

+ 11 - 3
tests/test_device_config.py

@@ -256,10 +256,18 @@ class TestDeviceConfig(IsolatedAsyncioTestCase):
             )
             extra.add(dp.name)
             mappings = dp._config.get("mapping", [])
-            self.assertIsInstance(mappings, list, f"mapping is not a list in {cfg}; entity {e}, dp {dp.name}")
+            self.assertIsInstance(
+                mappings,
+                list,
+                f"mapping is not a list in {cfg}; entity {e}, dp {dp.name}",
+            )
             for m in mappings:
                 conditions = m.get("conditions", [])
-                self.assertIsInstance(conditions, list, f"conditions is not a list in {cfg}; entity {e}, dp {dp.name}")
+                self.assertIsInstance(
+                    conditions,
+                    list,
+                    f"conditions is not a list in {cfg}; entity {e}, dp {dp.name}",
+                )
                 for c in conditions:
                     if c.get("value_redirect"):
                         redirects.add(c.get("value_redirect"))
@@ -274,7 +282,7 @@ class TestDeviceConfig(IsolatedAsyncioTestCase):
         for redirect in redirects:
             self.assertIn(redirect, extra, f"dp {redirect} missing from {e} in {cfg}")
 
-        # Check dps that are required for this entity type all exist 
+        # Check dps that are required for this entity type all exist
         expected = KNOWN_DPS.get(entity.entity)
         for rule in expected["required"]:
             self.assertTrue(