rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
reactor.clientTCP('localhost', FTP_PORT, client) | factory = ClientFactory() factory.buildProtocol = lambda s,c=client: c reactor.connectTCP('localhost', FTP_PORT, factory) | def gotError(failure, x, errors_=errors): errors_[x] = failure | 45bc6b89ef6d6e4b6238f6e24e3a10149acc387d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/45bc6b89ef6d6e4b6238f6e24e3a10149acc387d/test_ftp.py |
text += 'and ' + anchor | if len(authors) == 1: text = anchor else: text += 'and ' + anchor | def setAuthors(template, authors): # First, similarly to setTitle, insert text into an <div class="authors"> text = '' for name, href in authors: # FIXME: Do proper quoting/escaping (is it ok to use # xml.sax.saxutils.{escape,quoteattr}?) anchor = '<a href="%s">%s</a>' % (href, name) if (name, href) == authors[-1]: tex... | 12628f5181d81d72bded04712d482cfc57430b05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/12628f5181d81d72bded04712d482cfc57430b05/tree.py |
self.hProcess, hThread, dwPid, dwTid = win32process.CreateProcess(None, cmdline, None, None, 1, 0, environment, path, StartupInfo) | self.hProcess, hThread, dwPid, dwTid = win32process.CreateProcess(None, cmdline, None, None, 1, 0, env, path, StartupInfo) | def __init__(self, reactor, protocol, command, args, environment, path): self.reactor = reactor self.protocol = protocol | 42b623678657e8dc425ddcd98643968f4a8144e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/42b623678657e8dc425ddcd98643968f4a8144e4/win32eventreactor.py |
for n in "ttl", "received", "branch", "maddr", "rport": | for n in "ttl", "rport", "branch", "maddr", "received": | def toString(self): s = "SIP/2.0/%s %s:%s" % (self.transport, self.host, self.port) if self.hidden: s += ";hidden" for n in "ttl", "received", "branch", "maddr", "rport": value = getattr(self, n) if value == True: s += ";" + n elif value != None: s += ";%s=%s" % (n, value) return s | b4805b0d7a7e7465992102c4af94f885521a9db6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b4805b0d7a7e7465992102c4af94f885521a9db6/sip.py |
for m in self.messages: | for m in self.messages: | def datagramReceived(self, data, addr): self.parser.dataReceived(data) self.parser.dataDone() for m in self.messages: self._fixupNAT(m, addr) if self.debug: log.msg("Received %r from %r" % (m.toString(), addr)) if isinstance(m, Request): self.handle_request(m, addr) else: self.handle_response(m, addr) self.messages[:] ... | b4805b0d7a7e7465992102c4af94f885521a9db6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b4805b0d7a7e7465992102c4af94f885521a9db6/sip.py |
print "checking for NAT fixups" | def _fixupNAT(self, message, (srcHost, srcPort)): # RFC 2543 6.40.2, senderVia = parseViaHeader(message.headers["via"][0]) if senderVia.host != srcHost: senderVia.received = srcHost if senderVia.port != srcPort: senderVia.rport = srcPort message.headers["via"][0] = senderVia.toString() elif senderVia.rport == True: sen... | b4805b0d7a7e7465992102c4af94f885521a9db6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b4805b0d7a7e7465992102c4af94f885521a9db6/sip.py | |
if not message.headers.has_key("authorization"): | import pprint; pprint.pprint(message.headers) if not message.headers.has_key("proxy-authorization"): | def handle_REGISTER_request(self, message, (host, port)): """Handle a registration request. | b4805b0d7a7e7465992102c4af94f885521a9db6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b4805b0d7a7e7465992102c4af94f885521a9db6/sip.py |
m.headers.setdefault('www-authenticate', []).append(value) | m.headers.setdefault('Proxy-Authenticate', []).append(value) | def unauthorized(self, message, host, port): m = self.responseFromRequest(407, message) for (scheme, auth) in self.authorizers.iteritems(): chal = auth.getChallenge((host, port)) if chal is None: value = '%s realm="%s"' % (scheme.title(), self.host) else: value = '%s %s,realm="%s"' % (scheme.title(), chal, self.host) m... | b4805b0d7a7e7465992102c4af94f885521a9db6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b4805b0d7a7e7465992102c4af94f885521a9db6/sip.py |
parts = message.headers['authorization'][0].split(None, 1) | parts = message.headers['proxy-authorization'][0].split(None, 1) | def login(self, message, host, port): parts = message.headers['authorization'][0].split(None, 1) a = self.authorizers.get(parts[0].lower()) if a: try: c = a.decode(parts[1]) except SIPError: raise except: log.err() self.deliverResponse(self.responseFromRequest(500, message)) else: c.username += '@' + self.host self.por... | b4805b0d7a7e7465992102c4af94f885521a9db6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b4805b0d7a7e7465992102c4af94f885521a9db6/sip.py |
return defer.succeed(Registration(0, url)) | return defer.succeed(Registration(0, url)) | def _expireRegistration(self, username): try: dc, url = self.users[username] except KeyError: pass else: dc.cancel() del self.users[username] return defer.succeed(Registration(0, url)) | b4805b0d7a7e7465992102c4af94f885521a9db6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b4805b0d7a7e7465992102c4af94f885521a9db6/sip.py |
process = getattr(self, 'processAnswer_%d' % message.answers[0].type, None) | process = getattr(self, 'processAnswer_%d' % self.type, None) | def getAnswer(self, message): self.done = 1 self.removeAll() if not message.answers: self.errback("No answers") return process = getattr(self, 'processAnswer_%d' % message.answers[0].type, None) if process is None: self.errback("No processor for answer type %s" % message.answers[0].type) return self.callback(process(me... | 6f47c1a0adeb35adc7a29f90a83a4050fca41779 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6f47c1a0adeb35adc7a29f90a83a4050fca41779/dns.py |
self.errback("No processor for answer type %s" % message.answers[0].type) | self.errback("No processor for answer type %s" % self.type) | def getAnswer(self, message): self.done = 1 self.removeAll() if not message.answers: self.errback("No answers") return process = getattr(self, 'processAnswer_%d' % message.answers[0].type, None) if process is None: self.errback("No processor for answer type %s" % message.answers[0].type) return self.callback(process(me... | 6f47c1a0adeb35adc7a29f90a83a4050fca41779 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6f47c1a0adeb35adc7a29f90a83a4050fca41779/dns.py |
self.callback(process(message)) | process(message) | def getAnswer(self, message): self.done = 1 self.removeAll() if not message.answers: self.errback("No answers") return process = getattr(self, 'processAnswer_%d' % message.answers[0].type, None) if process is None: self.errback("No processor for answer type %s" % message.answers[0].type) return self.callback(process(me... | 6f47c1a0adeb35adc7a29f90a83a4050fca41779 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6f47c1a0adeb35adc7a29f90a83a4050fca41779/dns.py |
answer = random.choice(message.answers) return string.join(map(str, map(ord, answer.data)), '.') | answers, cnames, cnameMap = [], [], {} for answer in message.answers: if answer.type == 1: cnameMap[answer.name.name] = answer if answer.name.name != self.name: continue if answer.type == 1: answers.append(answer) elif answer.type == dns.CNAME: answer.strio.seek(answer.strioOff+2) n = dns.Name() n.decode(answer.strio) ... | def processAnswer_1(self, message): '''looking for name->address resolution choose one of the IPs at random''' answer = random.choice(message.answers) return string.join(map(str, map(ord, answer.data)), '.') | 6f47c1a0adeb35adc7a29f90a83a4050fca41779 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6f47c1a0adeb35adc7a29f90a83a4050fca41779/dns.py |
return ret | self.callback(ret) | def processAnswer_15(self, message): '''looking for Mail eXchanger for the domain | 6f47c1a0adeb35adc7a29f90a83a4050fca41779 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6f47c1a0adeb35adc7a29f90a83a4050fca41779/dns.py |
self.errback() | self.errback("Timed out") | def timeOut(self): if not self.done: self.removeAll() self.errback() self.done = 1 | 6f47c1a0adeb35adc7a29f90a83a4050fca41779 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6f47c1a0adeb35adc7a29f90a83a4050fca41779/dns.py |
class ILookupTable: | class ILookupTable(Interface): | def nameprep(self, label): return label.lower() | 9d1183daa46577a2735a59d4b5110e777bb41a72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9d1183daa46577a2735a59d4b5110e777bb41a72/xmpp_stringprep.py |
def lookup(self, c): | def lookup(c): | def lookup(self, c): """ Return whether character is in this table. """ | 9d1183daa46577a2735a59d4b5110e777bb41a72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9d1183daa46577a2735a59d4b5110e777bb41a72/xmpp_stringprep.py |
class IMappingTable: | class IMappingTable(Interface): | def lookup(self, c): """ Return whether character is in this table. """ | 9d1183daa46577a2735a59d4b5110e777bb41a72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9d1183daa46577a2735a59d4b5110e777bb41a72/xmpp_stringprep.py |
def map(self, c): | def map(c): | def map(self, c): """ Return mapping for character. """ | 9d1183daa46577a2735a59d4b5110e777bb41a72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9d1183daa46577a2735a59d4b5110e777bb41a72/xmpp_stringprep.py |
__implements__ = ILookupTable | implements(ILookupTable) | def map(self, c): """ Return mapping for character. """ | 9d1183daa46577a2735a59d4b5110e777bb41a72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9d1183daa46577a2735a59d4b5110e777bb41a72/xmpp_stringprep.py |
__implements__ = ILookupTable | implements(ILookupTable) | def __init__(self, in_table_function): self.lookup = in_table_function | 9d1183daa46577a2735a59d4b5110e777bb41a72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9d1183daa46577a2735a59d4b5110e777bb41a72/xmpp_stringprep.py |
__implements__ = IMappingTable | implements(IMappingTable) | def lookup(self, c): return c in self._table | 9d1183daa46577a2735a59d4b5110e777bb41a72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9d1183daa46577a2735a59d4b5110e777bb41a72/xmpp_stringprep.py |
__implements__ = IMappingTable | implements(IMappingTable) | def __init__(self, map_table_function): self.map = map_table_function | 9d1183daa46577a2735a59d4b5110e777bb41a72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9d1183daa46577a2735a59d4b5110e777bb41a72/xmpp_stringprep.py |
check_bidi=False) | check_bidi=False) | def nameprep(self, label): label = idna.nameprep(label) self.check_prohibiteds(label) if label[0] == '-': raise UnicodeError, "Invalid leading hyphen-minus" if label[-1] == '-': raise UnicodeError, "Invalid trailing hyphen-minus" return label | 9d1183daa46577a2735a59d4b5110e777bb41a72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9d1183daa46577a2735a59d4b5110e777bb41a72/xmpp_stringprep.py |
self.deferred.callback(self.s.getvalue()) | if self.deferred is not None: self.deferred.callback(self.s.getvalue()) | def processEnded(self, reason): self.deferred.callback(self.s.getvalue()) | f9f53b256297311f7bd8b6b3547c10e195ab17f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f9f53b256297311f7bd8b6b3547c10e195ab17f6/process.py |
heloFallback = 1 | heloFallback = True | def sentMail(self, code, resp, numOk, addresses, log): """Called when an attempt to send an email is completed. | b089bbfe243bef83b67311020291088cd7144e59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b089bbfe243bef83b67311020291088cd7144e59/smtp.py |
def esmtpState_ehlo(self, code, resp): self.sendLine('EHLO ' + self.identity) self._expected = SUCCESS | b089bbfe243bef83b67311020291088cd7144e59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b089bbfe243bef83b67311020291088cd7144e59/smtp.py | ||
class SMTPSender(SMTPClient, SenderMixin): | class SMTPSender(SenderMixin, SMTPClient): | def sentMail(self, code, resp, numOk, addresses, log): self.factory.sendFinished = 1 if code not in SUCCESS: # Failure errlog = [] for addr, acode, aresp in addresses: if code not in SUCCESS: errlog.append("%s: %03d %s" % (addr, acode, aresp)) if numOk: errlog.append(str(log)) exc = SMTPDeliveryError(code, resp, '\n'.j... | b089bbfe243bef83b67311020291088cd7144e59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b089bbfe243bef83b67311020291088cd7144e59/smtp.py |
class ESMTPSender(ESMTPClient, SenderMixin): | class ESMTPSender(SenderMixin, ESMTPClient): | def challengeResponse(self, secret, chal=1): if chal == 1: return "%s\0%s\0%s" % (self.user, self.user, secret) else: return "%s\0%s" % (self.user, secret) | b089bbfe243bef83b67311020291088cd7144e59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b089bbfe243bef83b67311020291088cd7144e59/smtp.py |
def __init__(self, username, password, fromEmail, toEmail, file, deferred, retries=5): | def __init__(self, username, password, fromEmail, toEmail, file, deferred, retries=5, heloFallback=False, requireAuthentication=True, requireTransportSecurity=True): | def __init__(self, username, password, fromEmail, toEmail, file, deferred, retries=5): SMTPSenderFactory.__init__(self, fromEmail, toEmail, file, deferred, retries) self.username = username self.password = password | b089bbfe243bef83b67311020291088cd7144e59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b089bbfe243bef83b67311020291088cd7144e59/smtp.py |
if hasattr(self.shell, 'logout') and self.shell.logout is not None: self.shell.logout() | def connectionLost(self, reason): log.msg("Oops! lost connection\n %s" % reason) # if we have a DTP protocol instance running and # we lose connection to the client's PI, kill the # DTP connection and close the port if self.dtpFactory: self.cleanupDTP() self.setTimeout(None) self.factory.currentInstanceNum -= 1 | d3bc655e6ddf82a32d5fc4548b7cba73e13ad2c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/d3bc655e6ddf82a32d5fc4548b7cba73e13ad2c6/ftp.py | |
failure.trap(error.UnauthorizedLogin, error.UnhandledCredentials) self.reply(AUTH_FAILURE, '') | r = failure.trap(error.UnauthorizedLogin, TLDNotSetInRealmError) if r == TLDNotSetInRealmError: log.debug(failure.getErrorMessage()) self.reply(REQ_ACTN_NOT_TAKEN, 'internal server error') self.transport.loseConnection() else: self.reply(AUTH_FAILURE, '') | def _ebLogin(self, failure): # hack? error.UnhandledCredentials instead of...? failure.trap(error.UnauthorizedLogin, error.UnhandledCredentials) self.reply(AUTH_FAILURE, '') | d3bc655e6ddf82a32d5fc4548b7cba73e13ad2c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/d3bc655e6ddf82a32d5fc4548b7cba73e13ad2c6/ftp.py |
def stopFactory(self): # make sure ftp instance's timeouts are set to None # to avoid reactor complaints [p.setTimeout(None) for p in self.instances if p.timeOut is not None] | d3bc655e6ddf82a32d5fc4548b7cba73e13ad2c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/d3bc655e6ddf82a32d5fc4548b7cba73e13ad2c6/ftp.py | ||
def __init__(self, user=None): | uid = None gid = None clientwd = '/' filepath = None def __init__(self, user=None, tld=None): | def __init__(self, user=None): """Constructor @param user: the name of the user whose permissions we'll be using @type user: string """ self.user = user # user name self.uid = None # uid of anonymous user for shell self.gid = None # gid of anonymous user for shell self.clientwd = None... | d3bc655e6ddf82a32d5fc4548b7cba73e13ad2c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/d3bc655e6ddf82a32d5fc4548b7cba73e13ad2c6/ftp.py |
self.uid = None self.gid = None self.clientwd = None self.tld = None | self.tld = tld | def __init__(self, user=None): """Constructor @param user: the name of the user whose permissions we'll be using @type user: string """ self.user = user # user name self.uid = None # uid of anonymous user for shell self.gid = None # gid of anonymous user for shell self.clientwd = None... | d3bc655e6ddf82a32d5fc4548b7cba73e13ad2c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/d3bc655e6ddf82a32d5fc4548b7cba73e13ad2c6/ftp.py |
def __init__(self, user=None): """Constructor @param user: the name of the user whose permissions we'll be using @type user: string """ self.user = user # user name self.uid = None # uid of anonymous user for shell self.gid = None # gid of anonymous user for shell self.clientwd = None... | d3bc655e6ddf82a32d5fc4548b7cba73e13ad2c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/d3bc655e6ddf82a32d5fc4548b7cba73e13ad2c6/ftp.py | ||
def _anonUserErrorMsg(self): pass | def _anonUserErrorMsg(self): pass | d3bc655e6ddf82a32d5fc4548b7cba73e13ad2c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/d3bc655e6ddf82a32d5fc4548b7cba73e13ad2c6/ftp.py | |
return "%s/%s" % (lpath, rpath) | return "%s%s%s" % (lpath, os.sep, rpath) | def myjoin(self, lpath, rpath): """does a dumb join between two path elements, ensuring there is only one '/' between them. pays no attention to the filesystem, unlike os.path.join @param lpath: path element to the left of the '/' in the result @type lpath: string @param rpath: path element to the right of the '/' in ... | d3bc655e6ddf82a32d5fc4548b7cba73e13ad2c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/d3bc655e6ddf82a32d5fc4548b7cba73e13ad2c6/ftp.py |
def list(self, path): sio = self.getUnixLongListString(path) #log.debug(sio.getvalue()) return (sio, len(sio.getvalue())) | d3bc655e6ddf82a32d5fc4548b7cba73e13ad2c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/d3bc655e6ddf82a32d5fc4548b7cba73e13ad2c6/ftp.py | ||
avatar = FTPAnonymousShell() avatar.tld = self.tld | if self.tld is None: raise TLDNotSetInRealmError("you must set FTPRealm's tld to a non-None value before creating avatars!!!") avatar = FTPAnonymousShell(user=self.user, tld=self.tld) | def requestAvatar(self, avatarId, mind, *interfaces): if IFTPShell in interfaces: avatar = FTPAnonymousShell() avatar.tld = self.tld avatar.clientwd = self.clientwd avatar.user = self.user avatar.logout = self.logout return IFTPShell, avatar, avatar.logout raise NotImplementedError("Only IFTPShell interface is supporte... | d3bc655e6ddf82a32d5fc4548b7cba73e13ad2c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/d3bc655e6ddf82a32d5fc4548b7cba73e13ad2c6/ftp.py |
avatar.user = self.user | def requestAvatar(self, avatarId, mind, *interfaces): if IFTPShell in interfaces: avatar = FTPAnonymousShell() avatar.tld = self.tld avatar.clientwd = self.clientwd avatar.user = self.user avatar.logout = self.logout return IFTPShell, avatar, avatar.logout raise NotImplementedError("Only IFTPShell interface is supporte... | d3bc655e6ddf82a32d5fc4548b7cba73e13ad2c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/d3bc655e6ddf82a32d5fc4548b7cba73e13ad2c6/ftp.py | |
def lineReceived(self, line): match = self.fileLinePattern.match(line) if match: dict = match.groupdict() dict['size'] = int(dict['size']) self.files.append(dict) | d3bc655e6ddf82a32d5fc4548b7cba73e13ad2c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/d3bc655e6ddf82a32d5fc4548b7cba73e13ad2c6/ftp.py | ||
def setUp(self): | def NOTsetUp(self): | def setUp(self): from twisted.internet import process process.Process.debug_child = True | 800086f1770ae6ae5a4715ddee65002466d61c9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/800086f1770ae6ae5a4715ddee65002466d61c9b/test_process.py |
def tearDown(self): | def NOTtearDown(self): | def tearDown(self): from twisted.internet import process process.Process.debug_child = False | 800086f1770ae6ae5a4715ddee65002466d61c9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/800086f1770ae6ae5a4715ddee65002466d61c9b/test_process.py |
task.schedule(self.connectionLost) | if self.connected: task.schedule(self.connectionLost) | def loseConnection(self): """ Stop accepting connections on this port. | 0af34b1785caf66bb98d3ea5e59a0c30afea53ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0af34b1785caf66bb98d3ea5e59a0c30afea53ca/tcp.py |
print `data` | def dataReceived(self, data): print `data` self.peer.write(data) | 2c987afdb2e75dabd53b0e9a0c46277c8326f985 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/2c987afdb2e75dabd53b0e9a0c46277c8326f985/stupidproxy.py | |
exitCode = os.WEXITSTATUS(self.status) | exitCode = os.WEXITSTATUS(self.status) | def maybeCallProcessEnded(self): # we don't call ProcessProtocol.processEnded until: # the child has terminated, AND # all writers have indicated an error status, AND # all readers have indicated EOF # This insures that we've gathered all output from the process. | 5ef1ff975104cfd785379f06d6b1ef94187a2e5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5ef1ff975104cfd785379f06d6b1ef94187a2e5f/process.py |
self.transport.write(' '.join(self.args)) | self.transport.write(' '.join(map(str, self.args))) | def connectionMade(self): self.transport.write(' '.join(self.args)) self.transport.loseConnection() | 031781fb498852309a4aff4950057fb54fe5e7c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/031781fb498852309a4aff4950057fb54fe5e7c3/inetd.py |
if not rpcConf.services.has_key(service.name): | protocol = protocol[4:] try: name, rpcVersions = service.name.split('rpc') except ValueError: log.msg('Bad RPC service/version: ' + service.name) continue if not rpcConf.services.has_key(name): | def main(options=None): # Parse options, read various config files if not options: options = InetdOptions() options.parseOptions() conf = inetdconf.InetdConf() conf.parseFile(open(options['file'])) rpcConf = inetdconf.RPCServicesConf() try: rpcConf.parseFile() except: # We'll survive even if we can't read /etc/rpc lo... | 031781fb498852309a4aff4950057fb54fe5e7c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/031781fb498852309a4aff4950057fb54fe5e7c3/inetd.py |
protocol = protocol[4:] | try: if '-' in rpcVersions: start, end = map(int, rpcVersions.split('-')) rpcVersions = range(start, end+1) else: rpcVersions = [int(rpcVersions)] except ValueError: log.msg('Bad RPC versions: ' + str(rpcVersions)) continue | def main(options=None): # Parse options, read various config files if not options: options = InetdOptions() options.parseOptions() conf = inetdconf.InetdConf() conf.parseFile(open(options['file'])) rpcConf = inetdconf.RPCServicesConf() try: rpcConf.parseFile() except: # We'll survive even if we can't read /etc/rpc lo... | 031781fb498852309a4aff4950057fb54fe5e7c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/031781fb498852309a4aff4950057fb54fe5e7c3/inetd.py |
if rpc: try: name, rpcVersions = service.name.split('rpc') except ValueError: log.msg('Bad RPC service/version: ' + service.name) continue try: if '-' in rpcVersions: start, end = map(int, rpcVersions.split('-')) rpcVersions = range(start, end+1) else: rpcVersions = [int(rpcVersions)] except ValueError: log.msg('Bad R... | def main(options=None): # Parse options, read various config files if not options: options = InetdOptions() options.parseOptions() conf = inetdconf.InetdConf() conf.parseFile(open(options['file'])) rpcConf = inetdconf.RPCServicesConf() try: rpcConf.parseFile() except: # We'll survive even if we can't read /etc/rpc lo... | 031781fb498852309a4aff4950057fb54fe5e7c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/031781fb498852309a4aff4950057fb54fe5e7c3/inetd.py | |
o2.callRemote("getCache").addCallback(coll.append) o2.callRemote("getCache").addCallback(coll.append) | o2.callRemote("getCache").addCallback(coll.append).addErrback(coll.append) o2.callRemote("getCache").addCallback(coll.append).addErrback(coll.append) | def testCache(self): c, s, pump = connectedServerAndClient() obj = NestedCache() obj2 = NestedComplicatedCache() vcc = obj2.c s.setNameForLocal("obj", obj) s.setNameForLocal("xxx", obj2) o2 = c.remoteForName("obj") o3 = c.remoteForName("xxx") coll = [] o2.callRemote("getCache").addCallback(coll.append) o2.callRemote("g... | 25f199613d1f7bedc263631a0d1a02188fd8d5c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/25f199613d1f7bedc263631a0d1a02188fd8d5c7/test_pb.py |
if sys.hexversion >= 0x2000000: | if sys.hexversion >= 0x2000000 and os.name != "java": | def testCache(self): c, s, pump = connectedServerAndClient() obj = NestedCache() obj2 = NestedComplicatedCache() vcc = obj2.c s.setNameForLocal("obj", obj) s.setNameForLocal("xxx", obj2) o2 = c.remoteForName("obj") o3 = c.remoteForName("xxx") coll = [] o2.callRemote("getCache").addCallback(coll.append) o2.callRemote("g... | 6f9c9e1ee32e29b132a13e52755c8fe53e150216 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6f9c9e1ee32e29b132a13e52755c8fe53e150216/test_pb.py |
self.transport.loseConnection() from twisted.internet import reactor | self.terminal.loseConnection() | def handle_QUIT(self): self.transport.loseConnection() from twisted.internet import reactor reactor.stop() | 65b6bc51b3f39a091a271c3f0325ccb6817612bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/65b6bc51b3f39a091a271c3f0325ccb6817612bf/stdio.py |
try: del self.channelsToRemoteChannel[channel] except KeyError: pass | del self.channelsToRemoteChannel[channel] | def ssh_CHANNEL_CLOSE(self, packet): localChannel = struct.unpack('>L', packet[: 4])[0] channel = self.channels[localChannel] channel.closed() del self.localToRemoteChannel[localChannel] del self.channels[localChannel] try: del self.channelsToRemoteChannel[channel] except KeyError: pass # we'd already closed this end | fcce0b8f53a8612daea81347b5307accdea0b856 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/fcce0b8f53a8612daea81347b5307accdea0b856/connection.py |
del self.channelsToRemoteChannel[channel] | def sendClose(self, channel): """ Close a channel. | fcce0b8f53a8612daea81347b5307accdea0b856 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/fcce0b8f53a8612daea81347b5307accdea0b856/connection.py | |
tlvData = reduce(lambda x,y: x+y, map(lambda (k,v):TLV(k,v), self.tlvs.items())) or '\000\000' | tlvData = reduce(lambda x,y: x+y, map(lambda (k,v):TLV(k,v), self.tlvs.items()), '\000\000') | def oscarRep(self, groupID, buddyID): tlvData = reduce(lambda x,y: x+y, map(lambda (k,v):TLV(k,v), self.tlvs.items())) or '\000\000' return struct.pack('!H', len(self.name)) + self.name + \ struct.pack('!HH', groupID, buddyID) + '\000\000' + tlvData | ebf0d01321e83aa01867b5f17863a3fbfd16436e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/ebf0d01321e83aa01867b5f17863a3fbfd16436e/oscar.py |
reflect.accumulateClassList(self.__class__, 'flags', flags) | def _gather_flags(self): """Gather up boolean (flag) options. """ | 6db8f942819c7bc0ce920361f879a1125e2a06db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6db8f942819c7bc0ce920361f879a1125e2a06db/usage.py | |
def _gather_parameters(self): """Gather options which take a value. """ longOpt, shortOpt = [], '' docs, settings, synonyms, dispatch = {}, {}, {}, {} | 6db8f942819c7bc0ce920361f879a1125e2a06db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6db8f942819c7bc0ce920361f879a1125e2a06db/usage.py | ||
reflect.accumulateClassList(self.__class__, 'parameters', parameters) | def _gather_parameters(self): """Gather options which take a value. """ longOpt, shortOpt = [], '' docs, settings, synonyms, dispatch = {}, {}, {}, {} | 6db8f942819c7bc0ce920361f879a1125e2a06db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6db8f942819c7bc0ce920361f879a1125e2a06db/usage.py | |
class ClientContextFactory(ContextFactory): """A sample context factory for SSL clients.""" | class ClientContextFactory: """A context factory for SSL clients.""" isClient = 1 | def getContext(self): """Create an SSL context. """ return self._context | da252bb4a66672c705ca51e0ca7b3393076a142e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/da252bb4a66672c705ca51e0ca7b3393076a142e/ssl.py |
return CONNECTION_LOST | return main.CONNECTION_LOST | def _postLoseConnection(self): """Gets called after loseConnection(), after buffered data is sent. | da252bb4a66672c705ca51e0ca7b3393076a142e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/da252bb4a66672c705ca51e0ca7b3393076a142e/ssl.py |
return CONNECTION_DONE | return main.CONNECTION_DONE | def _postLoseConnection(self): """Gets called after loseConnection(), after buffered data is sent. | da252bb4a66672c705ca51e0ca7b3393076a142e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/da252bb4a66672c705ca51e0ca7b3393076a142e/ssl.py |
"AdapterRegistry"] | "AdapterRegistry", "Adapter"] | def upgradeToVersion1(self): # To let Componentized instances interact correctly with # rebuild(), we cannot use class objects as dictionary keys. for (k, v) in self._adapterCache.items(): self._adapterCache[reflect.qual(k)] = v | 5538212fba4f6bc5ebfc25ecb28f99029bda6e66 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5538212fba4f6bc5ebfc25ecb28f99029bda6e66/components.py |
if the user method returns a deferred, this method will wait for the result, or will call any registered errorHandlers. | if the user method returns a deferred, this method will wait for the result, or will call any registered errorHandlers. | def call(*a, **kw): """call the user-defined method with arguments (*a, **kw) if the user method returns a deferred, this method will wait for the result, or will call any registered errorHandlers. @return: self """ | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
"""a method that will be called if and when an error occurs in the user-defined-method It will be called callable(fail, *a, **kw), where fail is a L{twisted.python.failure.Failure} object. | """a method that will be called if and when an error occurs in the user-defined-method. It will be called callable(fail, *a, **kw), where fail is a L{twisted.python.failure.Failure} object. | def addErrback(callable, *a, **kw): """a method that will be called if and when an error occurs in the user-defined-method It will be called callable(fail, *a, **kw), where fail is a L{twisted.python.failure.Failure} object. @return: self """ | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
logErrCheck = zi.Attribute("""@cvar doLogErrCheck: perform check and cleanup of log.errs @type doLogErrCheck: Boolean""") cleanPending = zi.Attribute("""@cvar cleanPending: check and cleanup of left-over reactor.delayedCalls @type cleanPending: Boolean""") cleanThreads = zi.Attribute("""@cvar cleanThreads: perform cl... | logErrCheck = zi.Attribute( """@cvar doLogErrCheck: perform check and cleanup of log.errs @type doLogErrCheck: Boolean""") cleanPending = zi.Attribute( """@cvar cleanPending: check and cleanup of left-over reactor.DelayedCalls @type cleanPending: Boolean""") cleanThreads = zi.Attribute( """@cvar cleanThreads: perform... | def addErrback(callable, *a, **kw): """a method that will be called if and when an error occurs in the user-defined-method It will be called callable(fail, *a, **kw), where fail is a L{twisted.python.failure.Failure} object. @return: self """ | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
"""perform cleanup operations that were specified in my constructor for running after each ITestMethod | """perform cleanup operations that were specified in my constructor for running after each ITestMethod | def postMethodCleanup(): """perform cleanup operations that were specified in my constructor for running after each ITestMethod @return: a sequence of L{twisted.python.failure.Failure} objects """ | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
"""perform cleanup operations that were specified in my constructor for running after each ITestCase | """perform cleanup operations that were specified in my constructor for running after each ITestCase | def postCaseCleanup(): """perform cleanup operations that were specified in my constructor for running after each ITestCase @return: a sequence of L{twisted.python.failure.Failure} objects """ | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
"""I allow for more fine-tuned descriptions of what types of errors or failures """ types = zi.Attribute("""a tuple of Exception types that we expect the test to have, if the ITestMethod's .failures or .errors don't match these types, the test is an ERROR""") | """I allow for more fine-tuned descriptions of what types of errors or failures """ types = zi.Attribute( """a tuple of Exception types that we expect the test to have, if the ITestMethod's .failures or .errors don't match these types, the test is an ERROR""") | def postCaseCleanup(): """perform cleanup operations that were specified in my constructor for running after each ITestCase @return: a sequence of L{twisted.python.failure.Failure} objects """ | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
"""returns True if exceptionType is an expected failure type, False otherwise if .types is None, should always return True | """returns True if exceptionType is an expected failure type, False otherwise if .types is None, should always return True | def isExpected(exceptionType): """returns True if exceptionType is an expected failure type, False otherwise if .types is None, should always return True """ | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
duration = zi.Attribute("a float representing how long, in seconds, the framework should wait before timing out") excClass = zi.Attribute("the exception to raise if the timeout duration is exceeded") excArg = zi.Attribute("the argument to excClass that the timeout will raise") | duration = zi.Attribute("a float representing how long, in seconds, the " "framework should wait before timing out") excClass = zi.Attribute("the exception to raise if the timeout duration " "is exceeded") excArg = zi.Attribute( "the argument to excClass that the timeout will raise") | def __add__(other): """returns .msg + other, for string concatenation""" | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
startTime = zi.Attribute("""@ivar startTime: the time this event started @type startTime: types.FloatType in seconds-since-the-epoch""") endTime = zi.Attribute("""@ivar endTime: the time this event ended @type endTime: types.FloatType in seconds-since-the-epoch""") | startTime = zi.Attribute( """@ivar startTime: the time this event started @type startTime: types.FloatType in seconds-since-the-epoch""") endTime = zi.Attribute( """@ivar endTime: the time this event ended @type endTime: types.FloatType in seconds-since-the-epoch""") | def tearDown(): """I am run after each method is run""" | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
methods = zi.Attribute("""@cvar methods: returns an iterator over all of the ITestMethods this TestSuite's ITestRunner objects have generated during the test run @note: this attribute is dynamically generated. if you access it before the tests have been run, the results are undefined""") | methods = zi.Attribute( """@cvar methods: returns an iterator over all of the ITestMethods this TestSuite's ITestRunner objects have generated during the test run @note: this attribute is dynamically generated. if you access it before the tests have been run, the results are undefined""") | def tearDown(): """I am run after each method is run""" | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
@param module: a module containing classes which implement twisted.trial.itrial.ITestCase | @param module: a module containing classes which implement twisted.trial.itrial.ITestCase | def addModule(module): """add all ITestCase classes from module to this test suite @param module: a module containing classes which implement twisted.trial.itrial.ITestCase """ | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
@param package: a package containing classes which implement twisted.trial.itrial.ITestCase | @param package: a package containing classes which implement twisted.trial.itrial.ITestCase | def addPackage(package): """add all ITestCase classes from package to this test suite @param package: a package containing classes which implement twisted.trial.itrial.ITestCase """ | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
testCaseInstance = zi.Attribute("""@ivar testCaseInstance: the instance of a TestCase subclass that we're running the tests for @type testCaseInstance: types.InstanceType""") setUpClass = zi.Attribute("""@ivar setUpClass: the setUpClass method of .testClassInstance @type setUpClass: types.MethodType""") tearDownClass... | testCaseInstance = zi.Attribute( """@ivar testCaseInstance: the instance of a TestCase subclass that we're running the tests for @type testCaseInstance: types.InstanceType""") setUpClass = zi.Attribute( """@ivar setUpClass: the setUpClass method of .testClassInstance @type setUpClass: types.MethodType""") tearDownCla... | def run(output, seed=None): """run this TestSuite and report to output""" | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
methodNames = zi.Attribute("""@ivar methodNames: iteratable of the method names of the TestClass @type methodNames: an iterable object""") methods = zi.Attribute("""@ivar methods: the method objects of the ITestRunner @type methods: a list of types.MethodType""") methodsWithStatus = zi.Attribute("""@ivar methodsWit... | methodNames = zi.Attribute( """@ivar methodNames: iteratable of the method names of the TestClass @type methodNames: an iterable object""") methods = zi.Attribute( """@ivar methods: the method objects of the ITestRunner @type methods: a list of types.MethodType""") methodsWithStatus = zi.Attribute( """@ivar method... | def run(output, seed=None): """run this TestSuite and report to output""" | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
status = zi.Attribute("""@ivar status: the reporter.STATUS of this test run @type status: str @notes: Status is determined according to the following rules: if the method is marked as todo and there is a failure or an error, the status is EXPECTED_FAILURE if the method marked as a skip, the status is SKIP if the method... | status = zi.Attribute( """@ivar status: the reporter.STATUS of this test run @type status: str @notes: Status is determined according to the following rules: if the method is marked as todo and there is a failure or an error, the status is EXPECTED_FAILURE if the method marked as a skip, the status is SKIP if the metho... | def runTests(): """runs this test class""" | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
todo = zi.Attribute("""@ivar todo: indicates whether or not this method has been marked todo, @type todo: this is the value of the .todo attribute or returns None""") skip = zi.Attribute("""@ivar skip: indicates whether or not this method has been skipped, same semantics as .todo @type skip: string @note: a TestMethod... | todo = zi.Attribute( """@ivar todo: indicates whether or not this method has been marked as 'todo' @type todo: this is the value of the .todo attribute, or None""") skip = zi.Attribute( """@ivar skip: indicates whether or not this method has been skipped, same semantics as .todo @type skip: string @note: a TestMethod ... | def runTests(): """runs this test class""" | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
failures = zi.Attribute("""@ivar failures: a list of all failures that occurred during the run(s) of this test method @type failures: list of failure.Failures""") logevents = zi.Attribute("""@ivar logevents: log.msg and log.err events captured during the run of this method @type logevents: list of dicts of strings Lo... | failures = zi.Attribute( """@ivar failures: a list of all failures that occurred during the run(s) of this test method @type failures: list of failure.Failures""") logevents = zi.Attribute( """@ivar logevents: log.msg and log.err events captured during the run of this method @type logevents: list of dicts of strings ... | def runTests(): """runs this test class""" | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
runs = zi.Attribute("""@ivar runs: the number of times this method has been run @type runs: int""") hasTbs = zi.Attribute("""@ivar hasTbs: True if this test method has errors or failures @type: Boolean """) | runs = zi.Attribute( """@ivar runs: the number of times this method has been run @type runs: int""") hasTbs = zi.Attribute( """@ivar hasTbs: True if this test method has errors or failures @type: Boolean""") | def runTests(): """runs this test class""" | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
this is also dependent on the reporter, defaults to 'plain' | this is also dependent on the reporter, defaults to 'plain' | def __call__(self, stream=sys.stdout, tbformat='plain', args=None): """this translates to the Reporter class' __init__ method @param stream: the io-stream that this reporter will write to. this is optional depending on the reporter, defaults to L{sys.stdout} @param tbformat: either 'plain' or 'emacs' this is also depen... | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
@note: implementors: methods such as startTest/endTest must perform an adaptation on the argument received to the proper interface. """ debugger = zi.Attribute("""@ivar debugger: Run the debugger when encountering a failing test. @type debugger: bool""") | @note: implementors: methods such as startTest/endTest must perform an adaptation on the argument received to the proper interface. """ debugger = zi.Attribute( """@ivar debugger: Run the debugger when encountering a failing test. @type debugger: bool""") | def __call__(self, stream=sys.stdout, tbformat='plain', args=None): """this translates to the Reporter class' __init__ method @param stream: the io-stream that this reporter will write to. this is optional depending on the reporter, defaults to L{sys.stdout} @param tbformat: either 'plain' or 'emacs' this is also depen... | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
"""performs reporter termination, for example, disconnecting from a remote service | """performs reporter termination, for example, disconnecting from a remote service | def tearDownReporter(): """performs reporter termination, for example, disconnecting from a remote service @returns: L{twisted.internet.defer.Deferred} """ | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
"""at the end of a test run report the overall status and print out any errors caught @param suite: an object implementing ITestSuite, can be adapted to ITestStats | """at the end of a test run report the overall status and print out any errors caught @param suite: an object implementing ITestSuite, can be adapted to ITestStats | def endSuite(suite): """at the end of a test run report the overall status and print out any errors caught @param suite: an object implementing ITestSuite, can be adapted to ITestStats """ | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
@param warn: indicates whether or not the reporter should emit a warning about the error | @param warn: indicates whether or not the reporter should emit a warning about the error | def upDownError(userMeth, warn=True, printStatus=True): """called when an error occurs in a setUp* or tearDown* method @param warn: indicates whether or not the reporter should emit a warning about the error @type warn: Boolean @param printStatus: indicates whether or not the reporter should print the name of the metho... | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
@param printStatus: indicates whether or not the reporter should print the name of the method and the status message appropriate for the type of error | @param printStatus: indicates whether or not the reporter should print the name of the method and the status message appropriate for the type of error | def upDownError(userMeth, warn=True, printStatus=True): """called when an error occurs in a setUp* or tearDown* method @param warn: indicates whether or not the reporter should emit a warning about the error @type warn: Boolean @param printStatus: indicates whether or not the reporter should print the name of the metho... | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
"""connect to a BuildBot buildslave using pb. makes use of the value set in L{twisted.trial.itrial.IReporter.args} | """connect to a BuildBot buildslave using pb. makes use of the value set in L{twisted.trial.itrial.IReporter.args} | def connectToSlave(self): """connect to a BuildBot buildslave using pb. makes use of the value set in L{twisted.trial.itrial.IReporter.args} """ | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
imports = zi.Attribute("""@ivar imports: Import errors encountered while assembling the test suite. @type imports: List of objects adaptable to ITestMethod""") failures = zi.Attribute("""@ivar failures: Tests which have failed. @type failures: list of objects adaptable to ITestMethod""") numTests = zi.Attribute("""@i... | imports = zi.Attribute( """@ivar imports: Import errors encountered while assembling the test suite. @type imports: List of objects adaptable to ITestMethod""") failures = zi.Attribute( """@ivar failures: Tests which have failed. @type failures: list of objects adaptable to ITestMethod""") numTests = zi.Attribute( ""... | def connectToSlave(self): """connect to a BuildBot buildslave using pb. makes use of the value set in L{twisted.trial.itrial.IReporter.args} """ | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
"""return the properly formatted error given the ITestMethod's status""" | """return the properly formatted error given the ITestMethod's status""" | def __str__(): """return the properly formatted error given the ITestMethod's status""" | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
name = zi.Attribute('@ivar name: the name of the module for which exception occured') | name = zi.Attribute( '@ivar name: the name of the module for which exception occured') | def __str__(): """return the properly formatted error given the ITestMethod's status""" | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
"""a compatability interface to provide information JellyReporter needs from ITestMethods""" | """a compatability interface to provide information JellyReporter needs from ITestMethods""" | def __str__(): """return the properly formatted error given the ITestMethod's status""" | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
"""returns a string representing a traceback, but without trial's internals""" | """returns a string representing a traceback, but without trial's internals""" | def __str__(): """return the properly formatted error given the ITestMethod's status""" | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
"""returns a string representing an object's 'owning' class' fully-qualified name or in the case of a string, returns just the string | """returns a string representing an object's 'owning' class' fully-qualified name or in the case of a string, returns just the string | def __str__(): """return the properly formatted error given the ITestMethod's status""" | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
in the case of a String, should return the fully-qualified class the string describes | in the case of a String, should return the fully-qualified class the string describes | def __str__(): """return the properly formatted error given the ITestMethod's status""" | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
in the case of a String, should return the fully-qualified module the string describes """ | in the case of a String, should return the fully-qualified module the string describes """ | def __str__(): """return the properly formatted error given the ITestMethod's status""" | 0890a2331ecc0224902839aa0bfb229eaa875f68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0890a2331ecc0224902839aa0bfb229eaa875f68/itrial.py |
def registerReapProccessHandler(pid, process): | def registerReapProcessHandler(pid, process): | def registerReapProccessHandler(pid, process): if reapProcessHandlers.has_key(pid): raise RuntimeError try: aux_pid, status = os.waitpid(pid, os.WNOHANG) except: log.deferr() aux_pid = None if aux_pid: process.processEnded(status) else: reapProcessHandlers[pid] = process | 6e5029b6945ddb47ed220fdcc89a120eabc49fb3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6e5029b6945ddb47ed220fdcc89a120eabc49fb3/process.py |
def unregisterReapProccessHandler(pid, process): | def unregisterReapProcessHandler(pid, process): | def unregisterReapProccessHandler(pid, process): if not (reapProcessHandlers.has_key(pid) and reapProcessHandlers[pid] == process): raise RuntimeError del reapProcessHandlers[pid] | 6e5029b6945ddb47ed220fdcc89a120eabc49fb3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/6e5029b6945ddb47ed220fdcc89a120eabc49fb3/process.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.