summaryrefslogtreecommitdiffstats
path: root/Lib/test/regrtest.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-xLib/test/regrtest.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index ffa67f1..c77abc3 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -37,6 +37,7 @@ import os
import getopt
import traceback
import random
+import StringIO
import test_support
@@ -284,7 +285,11 @@ def count(n, word):
class Compare:
def __init__(self, filename):
- self.fp = open(filename, 'r')
+ if os.path.exists(filename):
+ self.fp = open(filename, 'r')
+ else:
+ self.fp = StringIO.StringIO(
+ os.path.basename(filename) + "\n")
self.stuffthatmatched = []
def write(self, data):