mirror of
https://github.com/StevenBlack/hosts.git
synced 2024-07-02 02:25:54 +02:00
removed a manual indexer iterator pitfall from the code
This commit is contained in:
parent
12ad4d5fbf
commit
bce4b79920
|
@ -1605,8 +1605,8 @@ class DomainToIDNA(Base):
|
||||||
|
|
||||||
# Test with multiple tabulations as separator of domain and space and
|
# Test with multiple tabulations as separator of domain and space and
|
||||||
# tabulation as separator or comments.
|
# tabulation as separator or comments.
|
||||||
for i in range(len(self.domains)):
|
for i, domain in enumerate(self.domains):
|
||||||
data = (b"0.0.0.0\t\t\t" + self.domains[i] + b" \t # Hello World").decode(
|
data = (b"0.0.0.0\t\t\t" + domain + b" \t # Hello World").decode(
|
||||||
"utf-8"
|
"utf-8"
|
||||||
)
|
)
|
||||||
expected = "0.0.0.0\t\t\t" + self.expected_domains[i] + " \t # Hello World"
|
expected = "0.0.0.0\t\t\t" + self.expected_domains[i] + " \t # Hello World"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user