Jelajahi Sumber

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

Jason Rumney 1 tahun lalu
induk
melakukan
42ebd5ff79
1 mengubah file dengan 6 tambahan dan 6 penghapusan
  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):
     def test_configs_can_be_matched(self):
         """Test that the config files can be matched to a device."""
         """Test that the config files can be matched to a device."""
-        required_dps = 0
         for cfg in available_configs():
         for cfg in available_configs():
+            required_dps = 0
             parsed = TuyaDeviceConfig(cfg)
             parsed = TuyaDeviceConfig(cfg)
             for entity in parsed.all_entities():
             for entity in parsed.all_entities():
                 for dp in entity.dps():
                 for dp in entity.dps():
                     if not dp.optional:
                     if not dp.optional:
                         required_dps += 1
                         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
     # Most of the device_config functionality is exercised during testing of
     # the various supported devices.  These tests concentrate only on the gaps.
     # the various supported devices.  These tests concentrate only on the gaps.