mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Refs #23919 -- Replaced io.open() with open().
io.open() is an alias for open() on Python 3.
This commit is contained in:
committed by
Tim Graham
parent
eb422e476f
commit
a556396339
@@ -1,4 +1,3 @@
|
||||
import io
|
||||
import os
|
||||
import re
|
||||
import types
|
||||
@@ -269,10 +268,10 @@ def create_path(filename):
|
||||
|
||||
# Add valid and invalid URL tests.
|
||||
# This only tests the validator without extended schemes.
|
||||
with io.open(create_path('valid_urls.txt'), encoding='utf8') as f:
|
||||
with open(create_path('valid_urls.txt'), encoding='utf8') as f:
|
||||
for url in f:
|
||||
TEST_DATA.append((URLValidator(), url.strip(), None))
|
||||
with io.open(create_path('invalid_urls.txt'), encoding='utf8') as f:
|
||||
with open(create_path('invalid_urls.txt'), encoding='utf8') as f:
|
||||
for url in f:
|
||||
TEST_DATA.append((URLValidator(), url.strip(), ValidationError))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user