GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: prepare test/message/testcfg.py for Python 3 · nodejs/node@b1bbac7

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/message
    • testcfg.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/message/testcfg.py‎

Copy file name to clipboardExpand all lines: test/message/testcfg.py
+11-1Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@
3131
from os.path import join, exists, basename, isdir
3232
import re
3333

34+
try:
35+
reduce # Python 2
36+
except NameError: # Python 3
37+
from functools import reduce
38+
39+
try:
40+
xrange # Python 2
41+
except NameError:
42+
xrange = range # Python 3
43+
3444
FLAGS_PATTERN = re.compile(r"//\s+Flags:(.*)")
3545

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

5161
def IsFailureOutput(self, output):
52-
f = file(self.expected)
62+
f = open(self.expected)
5363
# Skip initial '#' comment and spaces
5464
#for line in f:
5565
# if (not line.startswith('#')) and (not line.strip()):

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.