diff options
Diffstat (limited to 'tests/unit/components/test_adblock.py')
-rw-r--r-- | tests/unit/components/test_adblock.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/unit/components/test_adblock.py b/tests/unit/components/test_adblock.py index 8dbd0ce29..6ee236765 100644 --- a/tests/unit/components/test_adblock.py +++ b/tests/unit/components/test_adblock.py @@ -96,7 +96,7 @@ def create_blocklist(directory, blocked_hosts=BLOCKLIST_HOSTS, 'not_correct' --> Not a correct hosts file format. """ blocklist_file = directory / name - with open(str(blocklist_file), 'w', encoding='UTF-8') as blocklist: + with blocklist_file.open('w', encoding='UTF-8') as blocklist: # ensure comments are ignored when processing blocklist blocklist.write('# Blocked Hosts List #\n\n') if line_format == 'etc_hosts': # /etc/hosts like format |