contains a single line of text giving the name of the output file. This
covers all tests that do not actually produce any output in the test code.
import getopt
import traceback
import random
+import StringIO
import test_support
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):