summaryrefslogtreecommitdiff
path: root/test/pseudo-tty/testcfg.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/pseudo-tty/testcfg.py')
-rw-r--r--test/pseudo-tty/testcfg.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/pseudo-tty/testcfg.py b/test/pseudo-tty/testcfg.py
index 9289ce4f10..85b304b09c 100644
--- a/test/pseudo-tty/testcfg.py
+++ b/test/pseudo-tty/testcfg.py
@@ -32,6 +32,11 @@ from os.path import join, exists, basename, isdir
import re
import utils
+try:
+ xrange # Python 2
+except NameError:
+ xrange = range # Python 3
+
FLAGS_PATTERN = re.compile(r"//\s+Flags:(.*)")
class TTYTestCase(test.TestCase):
@@ -51,7 +56,7 @@ class TTYTestCase(test.TestCase):
else: return str.startswith('==') or str.startswith('**')
def IsFailureOutput(self, output):
- f = file(self.expected)
+ f = open(self.expected)
# Convert output lines to regexps that we can match
env = { 'basename': basename(self.file) }
patterns = [ ]