removed a manual indexer iterator pitfall from the code
authorNaelson Douglas <redacted>
Sun, 24 Oct 2021 17:06:53 +0000 (14:06 -0300)
committerNaelson Douglas <redacted>
Sun, 24 Oct 2021 17:06:53 +0000 (14:06 -0300)
testUpdateHostsFile.py

index 1f90e38986841c34357710931957ee4813f90bda..1562bafea17f4b56dd1c80301fc7b524b581d4f6 100644 (file)
@@ -1605,8 +1605,8 @@ class DomainToIDNA(Base):
 
         # Test with multiple tabulations as separator of domain and space and
         # tabulation as separator or comments.
-        for i in range(len(self.domains)):
-            data = (b"0.0.0.0\t\t\t" + self.domains[i] + b" \t # Hello World").decode(
+        for i, domain in enumerate(self.domains):
+            data = (b"0.0.0.0\t\t\t" + domain + b" \t # Hello World").decode(
                 "utf-8"
             )
             expected = "0.0.0.0\t\t\t" + self.expected_domains[i] + " \t # Hello World"
git clone https://git.99rst.org/PROJECT