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

Tests: fix indentation of dps check so it checks every file

Jason Rumney 1 год назад
Родитель
Сommit
42ebd5ff79
1 измененных файлов с 6 добавлено и 6 удалено
  1. 6 6
      tests/test_device_config.py

+ 6 - 6
tests/test_device_config.py

@@ -523,18 +523,18 @@ class TestDeviceConfig(IsolatedAsyncioTestCase):
 
     def test_configs_can_be_matched(self):
         """Test that the config files can be matched to a device."""
-        required_dps = 0
         for cfg in available_configs():
+            required_dps = 0
             parsed = TuyaDeviceConfig(cfg)
             for entity in parsed.all_entities():
                 for dp in entity.dps():
                     if not dp.optional:
                         required_dps += 1
-        self.assertGreater(
-            required_dps,
-            0,
-            msg=f"No required dps found in {cfg}",
-        )
+            self.assertGreater(
+                required_dps,
+                0,
+                msg=f"No required dps found in {cfg}",
+            )
 
     # Most of the device_config functionality is exercised during testing of
     # the various supported devices.  These tests concentrate only on the gaps.