Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion test/message/testcfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@
from os.path import join, exists, basename, isdir
import re

try:
reduce # Python 2
except NameError: # Python 3
from functools import reduce

try:
xrange # Python 2
except NameError:
xrange = range # Python 3

FLAGS_PATTERN = re.compile(r"//\s+Flags:(.*)")

class MessageTestCase(test.TestCase):
Expand All @@ -49,7 +59,7 @@ def IgnoreLine(self, str):
else: return str.startswith('==') or str.startswith('**')

def IsFailureOutput(self, output):
f = file(self.expected)
f = open(self.expected)
# Skip initial '#' comment and spaces
#for line in f:
# if (not line.startswith('#')) and (not line.strip()):
Expand Down