From a5563963397aeee30c32e3c1dab31bfe453ca89f Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Wed, 18 Jan 2017 22:05:41 +0100 Subject: Refs #23919 -- Replaced io.open() with open(). io.open() is an alias for open() on Python 3. --- tests/validators/tests.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests/validators') diff --git a/tests/validators/tests.py b/tests/validators/tests.py index d5fb2215ca..2f26efcaa5 100644 --- a/tests/validators/tests.py +++ b/tests/validators/tests.py @@ -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)) -- cgit v1.3