rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
def create_exe (self, arcname):
def create_exe (self, arcname, fullname):
def create_exe (self, arcname): import struct, zlib
d632280482e5e5e66cebc993062f0fd1e60755b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d632280482e5e5e66cebc993062f0fd1e60755b5/bdist_wininst.py
installer_name = "%s.win32.exe" % self.distribution.get_fullname()
installer_name = os.path.join(self.dist_dir, "%s.win32.exe" % fullname)
def create_exe (self, arcname): import struct, zlib
d632280482e5e5e66cebc993062f0fd1e60755b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d632280482e5e5e66cebc993062f0fd1e60755b5/bdist_wininst.py
dir = os.path.join(self.root, dir[1:])
dir = change_root(self.root, dir)
def run (self): self.mkpath(self.install_dir) for f in self.data_files: if type(f) == StringType: # its a simple file, so copy it self.copy_file(f, self.install_dir) else: # its a tuple with path to install to and a list of files dir = f[0] if not os.path.isabs(dir): dir = os.path.join(self.install_dir, dir) elif self....
f93105ab00774c131cbc05ed9bcc8ff1c97537e7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f93105ab00774c131cbc05ed9bcc8ff1c97537e7/install_data.py
print "install_lib: compile=%s, optimize=%s" % \ (`self.compile`, `self.optimize`)
def finalize_options (self):
ac6628ed538f28c8aa05350697c5cbbca3e9a3b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ac6628ed538f28c8aa05350697c5cbbca3e9a3b9/install_lib.py
linelen = 0
def write(s, output=output, lineEnd='\n'): # RFC 1521 requires that the line ending in a space or tab must have # that trailing character encoded. if s and s[-1:] in ' \t': output.write(s[:-1] + quote(s[-1]) + lineEnd) else: output.write(s + lineEnd)
50503384fc9729b28fea0707f75fdc1b0a4c4ee6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/50503384fc9729b28fea0707f75fdc1b0a4c4ee6/quopri.py
if linelen + len(c) >= MAXLINESIZE: if prevline is not None: write(prevline) prevline = EMPTYSTRING.join(outline) linelen = 0 outline = []
def write(s, output=output, lineEnd='\n'): # RFC 1521 requires that the line ending in a space or tab must have # that trailing character encoded. if s and s[-1:] in ' \t': output.write(s[:-1] + quote(s[-1]) + lineEnd) else: output.write(s + lineEnd)
50503384fc9729b28fea0707f75fdc1b0a4c4ee6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/50503384fc9729b28fea0707f75fdc1b0a4c4ee6/quopri.py
linelen += len(c)
def write(s, output=output, lineEnd='\n'): # RFC 1521 requires that the line ending in a space or tab must have # that trailing character encoded. if s and s[-1:] in ' \t': output.write(s[:-1] + quote(s[-1]) + lineEnd) else: output.write(s + lineEnd)
50503384fc9729b28fea0707f75fdc1b0a4c4ee6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/50503384fc9729b28fea0707f75fdc1b0a4c4ee6/quopri.py
prevline = EMPTYSTRING.join(outline) linelen = 0 outline = []
thisline = EMPTYSTRING.join(outline) while len(thisline) > MAXLINESIZE: write(thisline[:MAXLINESIZE-1], lineEnd='=\n') thisline = thisline[MAXLINESIZE-1:] prevline = thisline
def write(s, output=output, lineEnd='\n'): # RFC 1521 requires that the line ending in a space or tab must have # that trailing character encoded. if s and s[-1:] in ' \t': output.write(s[:-1] + quote(s[-1]) + lineEnd) else: output.write(s + lineEnd)
50503384fc9729b28fea0707f75fdc1b0a4c4ee6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/50503384fc9729b28fea0707f75fdc1b0a4c4ee6/quopri.py
header.append(mapping[2*i]+256*mapping[2*i+1])
if sys.byteorder == 'big': header.append(256*mapping[2*i]+mapping[2*i+1]) else: header.append(mapping[2*i]+256*mapping[2*i+1])
def _optimize_unicode(charset, fixup): charmap = [0]*65536 negate = 0 for op, av in charset: if op is NEGATE: negate = 1 elif op is LITERAL: charmap[fixup(av)] = 1 elif op is RANGE: for i in range(fixup(av[0]), fixup(av[1])+1): charmap[i] = 1 elif op is CATEGORY: # XXX: could expand category return charset # cannot com...
1a90052b5bb783167448ffac8179f5c2af18ea7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1a90052b5bb783167448ffac8179f5c2af18ea7f/sre_compile.py
def create_inifile (self):
def get_inidata (self): lines = []
def create_inifile (self): # Create an inifile containing data describing the installation. # This could be done without creating a real file, but # a file is (at least) useful for debugging bdist_wininst.
46fa11a9005ba8edc8d0089bc63675ba568773ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/46fa11a9005ba8edc8d0089bc63675ba568773ee/bdist_wininst.py
ini_name = "%s.ini" % metadata.get_fullname() self.announce ("creating %s" % ini_name) inifile = open (ini_name, "w")
def create_inifile (self): # Create an inifile containing data describing the installation. # This could be done without creating a real file, but # a file is (at least) useful for debugging bdist_wininst.
46fa11a9005ba8edc8d0089bc63675ba568773ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/46fa11a9005ba8edc8d0089bc63675ba568773ee/bdist_wininst.py
inifile.write ("[metadata]\n")
lines.append ("[metadata]")
def create_inifile (self): # Create an inifile containing data describing the installation. # This could be done without creating a real file, but # a file is (at least) useful for debugging bdist_wininst.
46fa11a9005ba8edc8d0089bc63675ba568773ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/46fa11a9005ba8edc8d0089bc63675ba568773ee/bdist_wininst.py
inifile.write ("%s=%s\n" % (name, repr (data)[1:-1]))
lines.append ("%s=%s" % (name, repr (data)[1:-1]))
def create_inifile (self): # Create an inifile containing data describing the installation. # This could be done without creating a real file, but # a file is (at least) useful for debugging bdist_wininst.
46fa11a9005ba8edc8d0089bc63675ba568773ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/46fa11a9005ba8edc8d0089bc63675ba568773ee/bdist_wininst.py
inifile.write ("\n[Setup]\n") inifile.write ("info=%s\n" % repr (info)[1:-1]) inifile.write ("pthname=%s.%s\n" % (metadata.name, metadata.version))
lines.append ("\n[Setup]") lines.append ("info=%s" % repr (info)[1:-1]) lines.append ("pthname=%s.%s" % (metadata.name, metadata.version))
def create_inifile (self): # Create an inifile containing data describing the installation. # This could be done without creating a real file, but # a file is (at least) useful for debugging bdist_wininst.
46fa11a9005ba8edc8d0089bc63675ba568773ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/46fa11a9005ba8edc8d0089bc63675ba568773ee/bdist_wininst.py
inifile.write ("target_version=%s\n" % self.target_version)
lines.append ("target_version=%s" % self.target_version)
def create_inifile (self): # Create an inifile containing data describing the installation. # This could be done without creating a real file, but # a file is (at least) useful for debugging bdist_wininst.
46fa11a9005ba8edc8d0089bc63675ba568773ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/46fa11a9005ba8edc8d0089bc63675ba568773ee/bdist_wininst.py
inifile.write ("title=%s\n" % repr (title)[1:-1]) inifile.close() return ini_name
lines.append ("title=%s" % repr (title)[1:-1]) return string.join (lines, "\n")
def create_inifile (self): # Create an inifile containing data describing the installation. # This could be done without creating a real file, but # a file is (at least) useful for debugging bdist_wininst.
46fa11a9005ba8edc8d0089bc63675ba568773ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/46fa11a9005ba8edc8d0089bc63675ba568773ee/bdist_wininst.py
import struct cfgdata = open (self.create_inifile()).read()
import struct self.mkpath(self.dist_dir) cfgdata = self.get_inidata()
def create_exe (self, arcname, fullname): import struct#, zlib
46fa11a9005ba8edc8d0089bc63675ba568773ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/46fa11a9005ba8edc8d0089bc63675ba568773ee/bdist_wininst.py
self._err_handler = handler.ErrorHandler()
self._err_handler = handler.ErrorHandler()
def __init__(self): self._cont_handler = handler.ContentHandler() #self._dtd_handler = handler.DTDHandler() #self._ent_handler = handler.EntityResolver() self._err_handler = handler.ErrorHandler()
2d5c793d9ed451a19712d06fbd40696db101927d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2d5c793d9ed451a19712d06fbd40696db101927d/xmlreader.py
def __init__(self, bufsize=2**16 ): self._bufsize=bufsize XMLReader.__init__( self ) def parse(self, source): self.prepareParser(source) inf=open( source ) buffer = inf.read(self._bufsize)
def __init__(self, bufsize=2**16): self._bufsize = bufsize XMLReader.__init__(self) def _parseOpenFile(self, source): buffer = source.read(self._bufsize)
def __init__(self, bufsize=2**16 ): self._bufsize=bufsize XMLReader.__init__( self )
2d5c793d9ed451a19712d06fbd40696db101927d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2d5c793d9ed451a19712d06fbd40696db101927d/xmlreader.py
buffer = inf.read(self._bufsize)
buffer = source.read(self._bufsize)
def parse(self, source): self.prepareParser(source) #FIXME: do some type checking: could be already stream, URL or # filename inf=open( source ) buffer = inf.read(self._bufsize) while buffer != "": self.feed(buffer) buffer = inf.read(self._bufsize) self.close() self.reset()
2d5c793d9ed451a19712d06fbd40696db101927d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2d5c793d9ed451a19712d06fbd40696db101927d/xmlreader.py
if __name__=="__main__":
if __name__ == "__main__":
def _test(): XMLReader() IncrementalParser() Locator() AttributesImpl()
2d5c793d9ed451a19712d06fbd40696db101927d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2d5c793d9ed451a19712d06fbd40696db101927d/xmlreader.py
host = urlparse.urlparse(req.get_full_url())[1]
host = req.get_host()
def do_open(self, http_class, req): host = urlparse.urlparse(req.get_full_url())[1] if not host: raise URLError('no host given')
588e408ceb85623e23f58811e069fa2f33012911 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/588e408ceb85623e23f58811e069fa2f33012911/urllib2.py
if not __debug__: expected = [ev for ev in expected if ev[0] != LINE]
def check_events(self, expected): events = self.get_events_wotime() if not __debug__: # Running under -O, so we don't get LINE events expected = [ev for ev in expected if ev[0] != LINE] if events != expected: self.fail( "events did not match expectation; got:\n%s\nexpected:\n%s" % (pprint.pformat(events), pprint.pforma...
a1f54b510eacddb9287a2f695dc575acd1977526 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a1f54b510eacddb9287a2f695dc575acd1977526/test_hotshot.py
def start_doctype_decl(self, name, pubid, sysid, has_internal_subset):
def start_doctype_decl(self, name, sysid, pubid, has_internal_subset):
def start_doctype_decl(self, name, pubid, sysid, has_internal_subset): self._lex_handler_prop.startDTD(name, pubid, sysid)
2186937a8b195f430f6068c37707003b2c901bd5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2186937a8b195f430f6068c37707003b2c901bd5/expatreader.py
writer.write("\n PUBLIC '%s'\n '%s'" % (self.publicId, self.systemId))
writer.write("%s PUBLIC '%s'%s '%s'" % (newl, self.publicId, newl, self.systemId))
def writexml(self, writer, indent="", addindent="", newl=""): writer.write("<!DOCTYPE ") writer.write(self.name) if self.publicId: writer.write("\n PUBLIC '%s'\n '%s'" % (self.publicId, self.systemId)) elif self.systemId: writer.write("\n SYSTEM '%s'" % self.systemId) if self.internalSubset is not None: writer.write...
a91c082e5ac1afbf694b067f6d0d9f2c1a744ed4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a91c082e5ac1afbf694b067f6d0d9f2c1a744ed4/minidom.py
writer.write("\n SYSTEM '%s'" % self.systemId)
writer.write("%s SYSTEM '%s'" % (newl, self.systemId))
def writexml(self, writer, indent="", addindent="", newl=""): writer.write("<!DOCTYPE ") writer.write(self.name) if self.publicId: writer.write("\n PUBLIC '%s'\n '%s'" % (self.publicId, self.systemId)) elif self.systemId: writer.write("\n SYSTEM '%s'" % self.systemId) if self.internalSubset is not None: writer.write...
a91c082e5ac1afbf694b067f6d0d9f2c1a744ed4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a91c082e5ac1afbf694b067f6d0d9f2c1a744ed4/minidom.py
writer.write(">\n")
writer.write(">"+newl)
def writexml(self, writer, indent="", addindent="", newl=""): writer.write("<!DOCTYPE ") writer.write(self.name) if self.publicId: writer.write("\n PUBLIC '%s'\n '%s'" % (self.publicId, self.systemId)) elif self.systemId: writer.write("\n SYSTEM '%s'" % self.systemId) if self.internalSubset is not None: writer.write...
a91c082e5ac1afbf694b067f6d0d9f2c1a744ed4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a91c082e5ac1afbf694b067f6d0d9f2c1a744ed4/minidom.py
writer.write('<?xml version="1.0" ?>\n') else: writer.write('<?xml version="1.0" encoding="%s"?>\n' % encoding)
writer.write('<?xml version="1.0" ?>'+newl) else: writer.write('<?xml version="1.0" encoding="%s"?>%s' % (encoding, newl))
def writexml(self, writer, indent="", addindent="", newl="", encoding = None): if encoding is None: writer.write('<?xml version="1.0" ?>\n') else: writer.write('<?xml version="1.0" encoding="%s"?>\n' % encoding) for node in self.childNodes: node.writexml(writer, indent, addindent, newl)
a91c082e5ac1afbf694b067f6d0d9f2c1a744ed4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a91c082e5ac1afbf694b067f6d0d9f2c1a744ed4/minidom.py
print 'shlex: reading from %s, line %d' % (self.instream,self.lineno)
print 'shlex: reading from %s, line %d' \ % (self.instream, self.lineno)
def __init__(self, instream=None, infile=None): if instream: self.instream = instream self.infile = infile else: self.instream = sys.stdin self.infile = None self.commenters = '#' self.wordchars = 'abcdfeghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_' self.whitespace = ' \t\r\n' self.quotes = '\'"' self.stat...
12ff9e258c4cbae402cb9ff8dd5bb4aa2eb3b538 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/12ff9e258c4cbae402cb9ff8dd5bb4aa2eb3b538/shlex.py
self.filestack = [(self.infile,self.instream,self.lineno)] + self.filestack
self.filestack.insert(0, (self.infile, self.instream, self.lineno))
def get_token(self): "Get a token from the input stream (or from stack if it's nonempty)" if self.pushback: tok = self.pushback[0] self.pushback = self.pushback[1:] if self.debug >= 1: print "shlex: popping token " + `tok` return tok
12ff9e258c4cbae402cb9ff8dd5bb4aa2eb3b538 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/12ff9e258c4cbae402cb9ff8dd5bb4aa2eb3b538/shlex.py
print 'shlex: popping to %s, line %d' % (self.instream, self.lineno)
print 'shlex: popping to %s, line %d' \ % (self.instream, self.lineno)
def get_token(self): "Get a token from the input stream (or from stack if it's nonempty)" if self.pushback: tok = self.pushback[0] self.pushback = self.pushback[1:] if self.debug >= 1: print "shlex: popping token " + `tok` return tok
12ff9e258c4cbae402cb9ff8dd5bb4aa2eb3b538 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/12ff9e258c4cbae402cb9ff8dd5bb4aa2eb3b538/shlex.py
print "shlex: in state " + repr(self.state) + " I see character: " + repr(nextchar)
print "shlex: in state", repr(self.state), \ "I see character:", repr(nextchar)
def read_token(self): "Read a token from the input stream (no pushback or inclusions)" tok = '' while 1: nextchar = self.instream.read(1); if nextchar == '\n': self.lineno = self.lineno + 1 if self.debug >= 3: print "shlex: in state " + repr(self.state) + " I see character: " + repr(nextchar) if self.state == None: sel...
12ff9e258c4cbae402cb9ff8dd5bb4aa2eb3b538 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/12ff9e258c4cbae402cb9ff8dd5bb4aa2eb3b538/shlex.py
lexer = shlex()
if len(sys.argv) == 1: lexer = shlex() else: file = sys.argv[1] lexer = shlex(open(file), file)
def error_leader(self, infile=None, lineno=None): "Emit a C-compiler-like, Emacs-friendly error-message leader." if not infile: infile = self.infile if not lineno: lineno = self.lineno return "\"%s\", line %d: " % (infile, lineno)
12ff9e258c4cbae402cb9ff8dd5bb4aa2eb3b538 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/12ff9e258c4cbae402cb9ff8dd5bb4aa2eb3b538/shlex.py
print "Token: " + repr(tt) if not tt:
if tt: print "Token: " + repr(tt) else:
def error_leader(self, infile=None, lineno=None): "Emit a C-compiler-like, Emacs-friendly error-message leader." if not infile: infile = self.infile if not lineno: lineno = self.lineno return "\"%s\", line %d: " % (infile, lineno)
12ff9e258c4cbae402cb9ff8dd5bb4aa2eb3b538 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/12ff9e258c4cbae402cb9ff8dd5bb4aa2eb3b538/shlex.py
def error_leader(self, infile=None, lineno=None): "Emit a C-compiler-like, Emacs-friendly error-message leader." if not infile: infile = self.infile if not lineno: lineno = self.lineno return "\"%s\", line %d: " % (infile, lineno)
12ff9e258c4cbae402cb9ff8dd5bb4aa2eb3b538 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/12ff9e258c4cbae402cb9ff8dd5bb4aa2eb3b538/shlex.py
def __init__(self, filename=None, mode=None,
f1409e06ab5e40cc3e2a8762690b55a092008400 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f1409e06ab5e40cc3e2a8762690b55a092008400/gzip.py
if not size:
readsize = 1024 if not size:
def read(self,size=None):
f1409e06ab5e40cc3e2a8762690b55a092008400 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f1409e06ab5e40cc3e2a8762690b55a092008400/gzip.py
self._read()
self._read(readsize) readsize = readsize * 2
def read(self,size=None):
f1409e06ab5e40cc3e2a8762690b55a092008400 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f1409e06ab5e40cc3e2a8762690b55a092008400/gzip.py
else:
else:
def read(self,size=None):
f1409e06ab5e40cc3e2a8762690b55a092008400 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f1409e06ab5e40cc3e2a8762690b55a092008400/gzip.py
self._read()
self._read(readsize) readsize = readsize * 2
def read(self,size=None):
f1409e06ab5e40cc3e2a8762690b55a092008400 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f1409e06ab5e40cc3e2a8762690b55a092008400/gzip.py
def _read(self): buf = self.fileobj.read(1024)
def _unread(self, buf): self.extrabuf = buf + self.extrabuf self.extrasize = len(buf) + self.extrasize def _read(self, size=1024): try: buf = self.fileobj.read(size) except AttributeError: raise EOFError, "Reached EOF"
def _read(self):
f1409e06ab5e40cc3e2a8762690b55a092008400 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f1409e06ab5e40cc3e2a8762690b55a092008400/gzip.py
line=""
bufs = [] readsize = 100
def readline(self):
f1409e06ab5e40cc3e2a8762690b55a092008400 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f1409e06ab5e40cc3e2a8762690b55a092008400/gzip.py
c = self.read(1) line = line + c if c=='\n' or c=="": break return line
c = self.read(readsize) i = string.find(c, '\n') if i >= 0 or c == '': bufs.append(c[:i]) self._unread(c[i+1:]) return string.join(bufs, '') bufs.append(c) readsize = readsize * 2
def readline(self):
f1409e06ab5e40cc3e2a8762690b55a092008400 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f1409e06ab5e40cc3e2a8762690b55a092008400/gzip.py
L=[] line = self.readline() while line!="": L.append(line) line = self.readline() return L
buf = self.read() return string.split(buf, '\n')
def readlines(self):
f1409e06ab5e40cc3e2a8762690b55a092008400 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f1409e06ab5e40cc3e2a8762690b55a092008400/gzip.py
if islink(component): resolved = os.readlink(component) (dir, file) = split(component) resolved = normpath(join(dir, resolved)) newpath = join(*([resolved] + bits[i:])) return realpath(newpath)
if islink(component): resolved = _resolve_link(component) if resolved is None: return join(*([component] + bits[i:])) else: newpath = join(*([resolved] + bits[i:])) return realpath(newpath)
def realpath(filename): """Return the canonical path of the specified filename, eliminating any
5e2231323420938944994cc25e60d37fe3a34de5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5e2231323420938944994cc25e60d37fe3a34de5/posixpath.py
os.mkdir(dst)
os.makedirs(dst) copystat(src, dst)
def copytree(src, dst, symlinks=False): """Recursively copy a directory tree using copy2(). The destination directory must not already exist. If exception(s) occur, an Error is raised with a list of reasons. If the optional symlinks flag is true, symbolic links in the source tree result in symbolic links in the desti...
48f3ea9a2c4d1cbade55a9ebfa99ff213338f948 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/48f3ea9a2c4d1cbade55a9ebfa99ff213338f948/shutil.py
dupDB.associate(secDB, lambda a, b: a+b)
def f(a,b): return a+b dupDB.associate(secDB, f)
def test00_associateDBError(self): if verbose: print '\n', '-=' * 30 print "Running %s.test00_associateDBError..." % \ self.__class__.__name__
4d44dec36295fb3edf7e6b9cf199afb5f1139ee2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4d44dec36295fb3edf7e6b9cf199afb5f1139ee2/test_associate.py
self.primary.open(self.filename, "primary", self.dbtype,
if db.version() >= (4, 1): self.primary.open(self.filename, "primary", self.dbtype,
def createDB(self, txn=None):
4d44dec36295fb3edf7e6b9cf199afb5f1139ee2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4d44dec36295fb3edf7e6b9cf199afb5f1139ee2/test_associate.py
self.getDB().associate(self.secDB, self.getGenre, txn=txn)
if db.version() >= (4,1): self.getDB().associate(self.secDB, self.getGenre, txn=txn) else: self.getDB().associate(self.secDB, self.getGenre)
def test13_associate_in_transaction(self): if verbose: print '\n', '-=' * 30 print "Running %s.test13_associateAutoCommit..." % \ self.__class__.__name__
4d44dec36295fb3edf7e6b9cf199afb5f1139ee2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4d44dec36295fb3edf7e6b9cf199afb5f1139ee2/test_associate.py
suite.addTest(unittest.makeSuite(AssociateBTreeTxnTestCase))
if db.version() >= (4, 1): suite.addTest(unittest.makeSuite(AssociateBTreeTxnTestCase))
def test_suite(): suite = unittest.TestSuite() if db.version() >= (3, 3, 11): suite.addTest(unittest.makeSuite(AssociateErrorTestCase)) suite.addTest(unittest.makeSuite(AssociateHashTestCase)) suite.addTest(unittest.makeSuite(AssociateBTreeTestCase)) suite.addTest(unittest.makeSuite(AssociateRecnoTestCase)) suite.ad...
4d44dec36295fb3edf7e6b9cf199afb5f1139ee2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4d44dec36295fb3edf7e6b9cf199afb5f1139ee2/test_associate.py
self.copy_file(name, outfile, preserve_mode = 0)
self.copy_file(os.path.join(package_dir, name), outfile, preserve_mode = 0)
def run(self): # Copies all .py files, then also copies the txt and gif files build_py.run(self) assert self.packages == [idlelib] for name in txt_files: outfile = self.get_plain_outfile(self.build_lib, [idlelib], name) dir = os.path.dirname(outfile) self.mkpath(dir) self.copy_file(name, outfile, preserve_mode = 0) for...
a3c4ce3d80ef72974f6f47d101fc7671bea4c55b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a3c4ce3d80ef72974f6f47d101fc7671bea4c55b/setup.py
icons = [os.path.join("Icons",name) for name in Icons]
icons = [os.path.join(package_dir, "Icons",name) for name in Icons] txts = [os.path.join(package_dir, name) for name in txt_files]
def get_source_files(self): # returns the .py files, the .txt files, and the icons icons = [os.path.join("Icons",name) for name in Icons] return build_py.get_source_files(self)+txt_files+icons
a3c4ce3d80ef72974f6f47d101fc7671bea4c55b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a3c4ce3d80ef72974f6f47d101fc7671bea4c55b/setup.py
package_dir = {idlelib:'.'},
package_dir = {idlelib: package_dir},
def _bytecode_filenames(self, files): files = [n for n in files if n.endswith('.py')] return install_lib._bytecode_filenames(self,files)
a3c4ce3d80ef72974f6f47d101fc7671bea4c55b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a3c4ce3d80ef72974f6f47d101fc7671bea4c55b/setup.py
scripts = ['idle']
scripts = [os.path.join(package_dir, 'idle')]
def _bytecode_filenames(self, files): files = [n for n in files if n.endswith('.py')] return install_lib._bytecode_filenames(self,files)
a3c4ce3d80ef72974f6f47d101fc7671bea4c55b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a3c4ce3d80ef72974f6f47d101fc7671bea4c55b/setup.py
def err(args):
def err(*args):
def err(args): savestdout = sys.stdout try: sys.stdout = sys.stderr for i in args: print i, print finally: sys.stdout = savestdout
6f0fa184056f6f90de6fc2c0546e39bcffc996e6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6f0fa184056f6f90de6fc2c0546e39bcffc996e6/cgen.py
e = 'Function', func, 'too complicated:' err(e + (a_type, a_mode, a_factor, a_sub))
err('Function', func, 'too complicated:', a_type, a_mode, a_factor, a_sub)
def generate(type, func, database): # # Check that we can handle this case: # no variable size reply arrays yet # n_in_args = 0 n_out_args = 0 # for a_type, a_mode, a_factor, a_sub in database: if a_mode == 's': n_in_args = n_in_args + 1 elif a_mode == 'r': n_out_args = n_out_args + 1 else: # Can't happen raise arg_err...
6f0fa184056f6f90de6fc2c0546e39bcffc996e6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6f0fa184056f6f90de6fc2c0546e39bcffc996e6/cgen.py
sys.path.append('/ufs/guido/src/video')
sys.path.append('/ufs/jack/src/av/video')
def help(): print 'Usage: video2rgb [options] [file] ...' print print 'Options:' print '-q : quiet, no informative messages' print '-m : create monochrome (greyscale) image files' print '-f prefix : create image files with names "prefix0000.rgb"' print 'file ... : file(s) to convert; default film.vid...
b500ee81297d7ad5c24061bc3c09bc097d1204b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b500ee81297d7ad5c24061bc3c09bc097d1204b5/video2rgb.py
m=None
m = (None, None)
def quoteaddr(addr): """Quote a subset of the email addresses defined by RFC 821. Should be able to handle anything rfc822.parseaddr can handle. """ m=None try: m=rfc822.parseaddr(addr)[1] except AttributeError: pass if not m: #something weird here.. punt -ddm return addr else: return "<%s>" % m
04a33f8d98c7335f2e18350cb748c62d89a9baeb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/04a33f8d98c7335f2e18350cb748c62d89a9baeb/smtplib.py
if not m:
if m == (None, None):
def quoteaddr(addr): """Quote a subset of the email addresses defined by RFC 821. Should be able to handle anything rfc822.parseaddr can handle. """ m=None try: m=rfc822.parseaddr(addr)[1] except AttributeError: pass if not m: #something weird here.. punt -ddm return addr else: return "<%s>" % m
04a33f8d98c7335f2e18350cb748c62d89a9baeb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/04a33f8d98c7335f2e18350cb748c62d89a9baeb/smtplib.py
return addr
return "<%s>" % addr
def quoteaddr(addr): """Quote a subset of the email addresses defined by RFC 821. Should be able to handle anything rfc822.parseaddr can handle. """ m=None try: m=rfc822.parseaddr(addr)[1] except AttributeError: pass if not m: #something weird here.. punt -ddm return addr else: return "<%s>" % m
04a33f8d98c7335f2e18350cb748c62d89a9baeb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/04a33f8d98c7335f2e18350cb748c62d89a9baeb/smtplib.py
if kwargs.has_key('command')
if kwargs.has_key('command'):
def __init__(self, master, variable, value, *values, **kwargs): kw = {"borderwidth": 2, "textvariable": variable, "indicatoron": 1, "relief": RAISED, "anchor": "c", "highlightthickness": 2} Widget.__init__(self, master, "menubutton", kw) self.widgetName = 'tk_optionMenu' menu = self.__menu = Menu(self, name="menu", tea...
91b1425797226e5b2cbacf628ecca3a41195b356 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/91b1425797226e5b2cbacf628ecca3a41195b356/Tkinter.py
s = marshal.dumps(f)
s = marshal.dumps(f, 2)
def test_floats(self): # Test a few floats small = 1e-25 n = sys.maxint * 3.7e250 while n > small: for expected in (-n, n): f = float(expected) s = marshal.dumps(f) got = marshal.loads(s) self.assertEqual(f, got) marshal.dump(f, file(test_support.TESTFN, "wb")) got = marshal.load(file(test_support.TESTFN, "rb")) self.a...
72aad72c74b370781a69de719c4029b7b10bed29 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/72aad72c74b370781a69de719c4029b7b10bed29/test_marshal.py
fp = open(MOFILE, 'w')
fp = open(MOFILE, 'wb')
def setup(): os.makedirs(LOCALEDIR) fp = open(MOFILE, 'w') fp.write(base64.decodestring(GNU_MO_DATA)) fp.close()
e31a7e6cf0b073bf6e7b29556ba805e09197a12c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e31a7e6cf0b073bf6e7b29556ba805e09197a12c/test_gettext.py
packkey(ae, key, value)
ae.AEPutAttributeDesc(key, pack(value))
def packevent(ae, parameters = {}, attributes = {}): for key, value in parameters.items(): packkey(ae, key, value) for key, value in attributes.items(): packkey(ae, key, value)
1634e38e363cf31965bdc24f5b1fcf1a5b0c0bb9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1634e38e363cf31965bdc24f5b1fcf1a5b0c0bb9/aetools.py
arguments[key] = edict[v]
arguments[key] = Enum(edict[v])
def enumsubst(arguments, key, edict): """Substitute a single enum keyword argument, if it occurs""" if not arguments.has_key(key) or edict is None: return v = arguments[key] ok = edict.values() if edict.has_key(v): arguments[key] = edict[v] elif not v in ok: raise TypeError, 'Unknown enumerator: %s'%v
1634e38e363cf31965bdc24f5b1fcf1a5b0c0bb9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1634e38e363cf31965bdc24f5b1fcf1a5b0c0bb9/aetools.py
opt_dict[opt] = (filename, parser.get(section,opt))
val = parser.get(section,opt) opt = string.replace(opt, '-', '_') opt_dict[opt] = (filename, val)
def parse_config_files (self, filenames=None):
8919bf51cbe9834ffb64922ee69a61816bf2fab0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8919bf51cbe9834ffb64922ee69a61816bf2fab0/dist.py
true if command-line were successfully parsed and we should carry
true if command-line was successfully parsed and we should carry
def parse_command_line (self): """Parse the setup script's command line, taken from the 'script_args' instance attribute (which defaults to 'sys.argv[1:]' -- see 'setup()' in core.py). This list is first processed for "global options" -- options that set attributes of the Distribution instance. Then, it is alternatel...
8919bf51cbe9834ffb64922ee69a61816bf2fab0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8919bf51cbe9834ffb64922ee69a61816bf2fab0/dist.py
'command_obj' must be a Commnd instance. If 'option_dict' is not
'command_obj' must be a Command instance. If 'option_dict' is not
def _set_command_options (self, command_obj, option_dict=None): """Set the options for 'command_obj' from 'option_dict'. Basically this means copying elements of a dictionary ('option_dict') to attributes of an instance ('command').
8919bf51cbe9834ffb64922ee69a61816bf2fab0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8919bf51cbe9834ffb64922ee69a61816bf2fab0/dist.py
if not hasattr(command_obj, option): raise DistutilsOptionError, \ ("error in %s: command '%s' has no such option '%s'") % \ (source, command_name, option) setattr(command_obj, option, value)
try: bool_opts = command_obj.boolean_options except AttributeError: bool_opts = [] try: neg_opt = command_obj.negative_opt except AttributeError: neg_opt = {} try: if neg_opt.has_key(option): setattr(command_obj, neg_opt[option], not strtobool(value)) elif option in bool_opts: setattr(command_obj, option, strtobool(va...
def _set_command_options (self, command_obj, option_dict=None): """Set the options for 'command_obj' from 'option_dict'. Basically this means copying elements of a dictionary ('option_dict') to attributes of an instance ('command').
8919bf51cbe9834ffb64922ee69a61816bf2fab0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8919bf51cbe9834ffb64922ee69a61816bf2fab0/dist.py
os.execve(scriptfile, args, env)
os.execve(scriptfile, args, os.environ)
def run_cgi(self): """Execute a CGI script.""" dir, rest = self.cgi_info i = rest.rfind('?') if i >= 0: rest, query = rest[:i], rest[i+1:] else: query = '' i = rest.find('/') if i >= 0: script, rest = rest[:i], rest[i:] else: script, rest = rest, '' scriptname = dir + '/' + script scriptfile = self.translate_path(scrip...
3b884c05567a557bf75367102944903d9657d2c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3b884c05567a557bf75367102944903d9657d2c0/CGIHTTPServer.py
self.error("expected name token")
self.error("expected name token at %r" % rawdata[declstartpos:declstartpos+20])
def _scan_name(self, i, declstartpos): rawdata = self.rawdata n = len(rawdata) if i == n: return None, -1 m = _declname_match(rawdata, i) if m: s = m.group() name = s.strip() if (i + len(s)) == n: return None, -1 # end of buffer return name.lower(), m.end() else: self.updatepos(declstartpos, i) self.error("expected na...
5495e33481d4c053ea2bc44dcaea1268ee5724ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5495e33481d4c053ea2bc44dcaea1268ee5724ea/markupbase.py
st = os.stat(src) mode = stat.S_IMODE(st[stat.ST_MODE]) os.chmod(dst, mode)
if hasattr(os, 'chmod'): st = os.stat(src) mode = stat.S_IMODE(st[stat.ST_MODE]) os.chmod(dst, mode)
def copymode(src, dst): """Copy mode bits from src to dst""" st = os.stat(src) mode = stat.S_IMODE(st[stat.ST_MODE]) os.chmod(dst, mode)
27f410fe7fc3510002f55d8f913a5013585914a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/27f410fe7fc3510002f55d8f913a5013585914a9/shutil.py
os.utime(dst, (st[stat.ST_ATIME], st[stat.ST_MTIME])) os.chmod(dst, mode)
if hasattr(os, 'utime'): os.utime(dst, (st[stat.ST_ATIME], st[stat.ST_MTIME])) if hasattr(os, 'chmod'): os.chmod(dst, mode)
def copystat(src, dst): """Copy all stat info (mode bits, atime and mtime) from src to dst""" st = os.stat(src) mode = stat.S_IMODE(st[stat.ST_MODE]) os.utime(dst, (st[stat.ST_ATIME], st[stat.ST_MTIME])) os.chmod(dst, mode)
27f410fe7fc3510002f55d8f913a5013585914a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/27f410fe7fc3510002f55d8f913a5013585914a9/shutil.py
setup(width=_width, height= _height, startx=_startx, starty=_starty)
setup(width=_width, height= _height, startx=_startx, starty=_starty)
def __init__(self): global _root, _canvas if _root is None: _root = Tkinter.Tk() _root.wm_protocol("WM_DELETE_WINDOW", self._destroy) _root.title(_title)
7b89d601609132aab5db317c8195fa1aa14ac36f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/7b89d601609132aab5db317c8195fa1aa14ac36f/turtle.py
matches = (['class', name], ['class', name + ':'])
pat = re.compile(r'^\s*class\s*' + name + r'\b')
def findsource(object): """Return the entire source file and starting line number for an object. The argument may be a module, class, method, function, traceback, frame, or code object. The source code is returned as a list of all the lines in the file and the line number indexes a line in that list. An IOError is r...
704c314f4179203a24c494f2a40dd915600f9c28 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/704c314f4179203a24c494f2a40dd915600f9c28/inspect.py
if string.split(lines[i])[:2] in matches: return lines, i
if pat.match(lines[i]): return lines, i
def findsource(object): """Return the entire source file and starting line number for an object. The argument may be a module, class, method, function, traceback, frame, or code object. The source code is returned as a list of all the lines in the file and the line number indexes a line in that list. An IOError is r...
704c314f4179203a24c494f2a40dd915600f9c28 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/704c314f4179203a24c494f2a40dd915600f9c28/inspect.py
if string.split(lines[lnum])[:1] == ['def']: break
if pat.match(lines[lnum]): break
def findsource(object): """Return the entire source file and starting line number for an object. The argument may be a module, class, method, function, traceback, frame, or code object. The source code is returned as a list of all the lines in the file and the line number indexes a line in that list. An IOError is r...
704c314f4179203a24c494f2a40dd915600f9c28 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/704c314f4179203a24c494f2a40dd915600f9c28/inspect.py
print 'h=',h
def getentry(self, which): self._check() if which == 'in': cmd = IN_ENTRY_SENSE elif which == 'out': cmd = OUT_ENTRY_SENSE self.replycmd(cmd) h = self._getnumber(2) print 'h=',h m = self._getnumber(2) print 'm=',m s = self._getnumber(2) print 's=',s f = self._getnumber(2) print 'f=',f return (h, m, s, f)
0b424aeee61cf467f726567c4a8deb7458742940 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0b424aeee61cf467f726567c4a8deb7458742940/VCR.py
print 'm=',m
def getentry(self, which): self._check() if which == 'in': cmd = IN_ENTRY_SENSE elif which == 'out': cmd = OUT_ENTRY_SENSE self.replycmd(cmd) h = self._getnumber(2) print 'h=',h m = self._getnumber(2) print 'm=',m s = self._getnumber(2) print 's=',s f = self._getnumber(2) print 'f=',f return (h, m, s, f)
0b424aeee61cf467f726567c4a8deb7458742940 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0b424aeee61cf467f726567c4a8deb7458742940/VCR.py
print 's=',s
def getentry(self, which): self._check() if which == 'in': cmd = IN_ENTRY_SENSE elif which == 'out': cmd = OUT_ENTRY_SENSE self.replycmd(cmd) h = self._getnumber(2) print 'h=',h m = self._getnumber(2) print 'm=',m s = self._getnumber(2) print 's=',s f = self._getnumber(2) print 'f=',f return (h, m, s, f)
0b424aeee61cf467f726567c4a8deb7458742940 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0b424aeee61cf467f726567c4a8deb7458742940/VCR.py
print 'f=',f
def getentry(self, which): self._check() if which == 'in': cmd = IN_ENTRY_SENSE elif which == 'out': cmd = OUT_ENTRY_SENSE self.replycmd(cmd) h = self._getnumber(2) print 'h=',h m = self._getnumber(2) print 'm=',m s = self._getnumber(2) print 's=',s f = self._getnumber(2) print 'f=',f return (h, m, s, f)
0b424aeee61cf467f726567c4a8deb7458742940 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0b424aeee61cf467f726567c4a8deb7458742940/VCR.py
if self.re._num_regs == 1: return () return apply(self.group, tuple(range(1, self.re._num_regs) ) )
result = [] for g in range(1, self.re._num_regs): if (self.regs[g][0] == -1) or (self.regs[g][1] == -1): result.append(None) else: result.append(self.string[self.regs[g][0]:self.regs[g][1]]) return tuple(result)
def groups(self):
94bba56373198613662f048b2c37f1963cae2e39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/94bba56373198613662f048b2c37f1963cae2e39/re.py
def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, exclude=0, single=0, randomize=0, fromfile=None, findleaks=0, use_resources=None):
def main(tests=None, testdir=None, verbose=0, quiet=False, generate=False, exclude=False, single=False, randomize=False, fromfile=None, findleaks=False, use_resources=None, trace=False):
def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, exclude=0, single=0, randomize=0, fromfile=None, findleaks=0, use_resources=None): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdi...
3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f/regrtest.py
The other default arguments (verbose, quiet, generate, exclude, single, randomize, findleaks, and use_resources) allow programmers calling main() directly to set the values that would normally be set by flags on the command line.
The other default arguments (verbose, quiet, generate, exclude, single, randomize, findleaks, use_resources, and trace) allow programmers calling main() directly to set the values that would normally be set by flags on the command line.
def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, exclude=0, single=0, randomize=0, fromfile=None, findleaks=0, use_resources=None): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdi...
3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f/regrtest.py
opts, args = getopt.getopt(sys.argv[1:], 'hvgqxsrf:lu:t:',
opts, args = getopt.getopt(sys.argv[1:], 'hvgqxsrf:lu:t:T',
def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, exclude=0, single=0, randomize=0, fromfile=None, findleaks=0, use_resources=None): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdi...
3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f/regrtest.py
'findleaks', 'use=', 'threshold='])
'findleaks', 'use=', 'threshold=', 'trace', ])
def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, exclude=0, single=0, randomize=0, fromfile=None, findleaks=0, use_resources=None): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdi...
3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f/regrtest.py
quiet = 1;
quiet = True;
def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, exclude=0, single=0, randomize=0, fromfile=None, findleaks=0, use_resources=None): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdi...
3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f/regrtest.py
generate = 1
generate = True
def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, exclude=0, single=0, randomize=0, fromfile=None, findleaks=0, use_resources=None): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdi...
3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f/regrtest.py
exclude = 1
exclude = True
def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, exclude=0, single=0, randomize=0, fromfile=None, findleaks=0, use_resources=None): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdi...
3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f/regrtest.py
single = 1
single = True
def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, exclude=0, single=0, randomize=0, fromfile=None, findleaks=0, use_resources=None): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdi...
3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f/regrtest.py
randomize = 1
randomize = True
def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, exclude=0, single=0, randomize=0, fromfile=None, findleaks=0, use_resources=None): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdi...
3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f/regrtest.py
findleaks = 1
findleaks = True
def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, exclude=0, single=0, randomize=0, fromfile=None, findleaks=0, use_resources=None): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdi...
3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f/regrtest.py
findleaks = 0
findleaks = False
def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, exclude=0, single=0, randomize=0, fromfile=None, findleaks=0, use_resources=None): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdi...
3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f/regrtest.py
ok = runtest(test, generate, verbose, quiet, testdir) if ok > 0: good.append(test) elif ok == 0: bad.append(test)
if trace: tracer.runctx('runtest(test, generate, verbose, quiet, testdir)', globals=globals(), locals=vars())
def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, exclude=0, single=0, randomize=0, fromfile=None, findleaks=0, use_resources=None): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdi...
3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f/regrtest.py
skipped.append(test) if ok == -2: resource_denieds.append(test)
ok = runtest(test, generate, verbose, quiet, testdir) if ok > 0: good.append(test) elif ok == 0: bad.append(test) else: skipped.append(test) if ok == -2: resource_denieds.append(test)
def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0, exclude=0, single=0, randomize=0, fromfile=None, findleaks=0, use_resources=None): """Execute a test suite. This also parses command-line options and modifies its behavior accordingly. tests -- a list of strings containing test names (optional) testdi...
3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f/regrtest.py
def runtest(test, generate, verbose, quiet, testdir = None):
def runtest(test, generate, verbose, quiet, testdir=None):
def runtest(test, generate, verbose, quiet, testdir = None): """Run a single test. test -- the name of the test generate -- if true, generate output, instead of running the test and comparing it to a previously created output file verbose -- if true, print more messages quiet -- if true, don't print 'skipped' messages ...
3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f/regrtest.py
if not testdir: testdir = findtestdir()
if not testdir: testdir = findtestdir()
def runtest(test, generate, verbose, quiet, testdir = None): """Run a single test. test -- the name of the test generate -- if true, generate output, instead of running the test and comparing it to a previously created output file verbose -- if true, print more messages quiet -- if true, don't print 'skipped' messages ...
3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3feaba6409bd3f4dce920f7a4f22e9e9361f6c5f/regrtest.py
path = os.path.join(os.path.dirname(test_email.__file__), 'data', filename)
path = os.path.join(os.path.dirname(test_support_file), 'data', filename)
def openfile(filename): path = os.path.join(os.path.dirname(test_email.__file__), 'data', filename) return open(path)
8df007729a0ab41938bd335c03f6e3934746c2ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8df007729a0ab41938bd335c03f6e3934746c2ff/test_email.py
if __name__ == '__main__': unittest.main(defaultTest='suite') else:
def test_main():
def suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(TestMessageAPI)) suite.addTest(unittest.makeSuite(TestEncoders)) suite.addTest(unittest.makeSuite(TestLongHeaders)) suite.addTest(unittest.makeSuite(TestFromMangling)) suite.addTest(unittest.makeSuite(TestMIMEAudio)) suite.addTest(unittest.makeS...
8df007729a0ab41938bd335c03f6e3934746c2ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8df007729a0ab41938bd335c03f6e3934746c2ff/test_email.py
def seval(item): """ Strips parens from item prior to calling eval in an attempt to make it safer """ return eval(item.replace('(', '').replace(')', ''))
def seval(item): """ Strips parens from item prior to calling eval in an attempt to make it safer """ return eval(item.replace('(', '').replace(')', ''))
5cf26e5184cafd0f87ad4cafc52ed5b635df0d4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5cf26e5184cafd0f87ad4cafc52ed5b635df0d4a/csv.py