codecs.open / io.open

This commit is contained in:
Anthony Sottile 2019-06-02 15:41:48 -07:00 committed by Bruno Oliveira
parent 4df529e5b9
commit c63320cc31
2 changed files with 4 additions and 6 deletions

View File

@ -1,5 +1,4 @@
"""(disabled by default) support for testing pytest and pytest plugins."""
import codecs
import gc
import os
import platform
@ -1089,8 +1088,8 @@ class Testdir:
p2 = self.tmpdir.join("stderr")
print("running:", *cmdargs)
print(" in:", py.path.local())
f1 = codecs.open(str(p1), "w", encoding="utf8")
f2 = codecs.open(str(p2), "w", encoding="utf8")
f1 = open(str(p1), "w", encoding="utf8")
f2 = open(str(p2), "w", encoding="utf8")
try:
now = time.time()
popen = self.popen(
@ -1125,8 +1124,8 @@ class Testdir:
finally:
f1.close()
f2.close()
f1 = codecs.open(str(p1), "r", encoding="utf8")
f2 = codecs.open(str(p2), "r", encoding="utf8")
f1 = open(str(p1), "r", encoding="utf8")
f2 = open(str(p2), "r", encoding="utf8")
try:
out = f1.read().splitlines()
err = f2.read().splitlines()

View File

@ -1,6 +1,5 @@
import os
import re
from io import open
import six