rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
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...
3b6d025d9bc6a0109e9a2ebd28a4864e8007193a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3b6d025d9bc6a0109e9a2ebd28a4864e8007193a/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...
3b6d025d9bc6a0109e9a2ebd28a4864e8007193a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3b6d025d9bc6a0109e9a2ebd28a4864e8007193a/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...
3b6d025d9bc6a0109e9a2ebd28a4864e8007193a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3b6d025d9bc6a0109e9a2ebd28a4864e8007193a/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...
3b6d025d9bc6a0109e9a2ebd28a4864e8007193a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3b6d025d9bc6a0109e9a2ebd28a4864e8007193a/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...
3b6d025d9bc6a0109e9a2ebd28a4864e8007193a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3b6d025d9bc6a0109e9a2ebd28a4864e8007193a/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...
3b6d025d9bc6a0109e9a2ebd28a4864e8007193a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3b6d025d9bc6a0109e9a2ebd28a4864e8007193a/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...
3b6d025d9bc6a0109e9a2ebd28a4864e8007193a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3b6d025d9bc6a0109e9a2ebd28a4864e8007193a/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...
3b6d025d9bc6a0109e9a2ebd28a4864e8007193a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3b6d025d9bc6a0109e9a2ebd28a4864e8007193a/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 ...
3b6d025d9bc6a0109e9a2ebd28a4864e8007193a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3b6d025d9bc6a0109e9a2ebd28a4864e8007193a/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 ...
3b6d025d9bc6a0109e9a2ebd28a4864e8007193a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3b6d025d9bc6a0109e9a2ebd28a4864e8007193a/regrtest.py
startofline = tell()
try: startofline = tell() except IOError: startofline = tell = None self.seekable = 0
def readheaders(self): """Read header lines. Read header lines up to the entirely blank line that terminates them. The (normally blank) line that ends the headers is skipped, but not included in the returned list. If a non-header line ends the headers, (which is an error), an attempt is made to backspace over it; it ...
a66eed62fd232bc276e9f8169f9d9025937f8899 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/a66eed62fd232bc276e9f8169f9d9025937f8899/rfc822.py
def pickle_complex(c): return complex, (c.real, c.imag)
try: complex except NameError: pass else:
def pickle_complex(c): return complex, (c.real, c.imag)
502ba4630358423dc3da4da0f3f938d3cb56281f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/502ba4630358423dc3da4da0f3f938d3cb56281f/copy_reg.py
pickle(type(1j), pickle_complex, complex)
def pickle_complex(c): return complex, (c.real, c.imag) pickle(complex, pickle_complex, complex)
def pickle_complex(c): return complex, (c.real, c.imag)
502ba4630358423dc3da4da0f3f938d3cb56281f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/502ba4630358423dc3da4da0f3f938d3cb56281f/copy_reg.py
raise TypeError, 'string payload expected'
raise TypeError, 'string payload expected: %s' % type(payload)
def _handle_text(self, msg): payload = msg.get_payload() if not isinstance(payload, StringType): raise TypeError, 'string payload expected' if self._mangle_from_: payload = fcre.sub('>From ', payload) self._fp.write(payload)
b384e01796fad1293256262e7ab022f176afce9a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b384e01796fad1293256262e7ab022f176afce9a/Generator.py
g = self.__class__(s)
g = self.__class__(s, self._mangle_from_, self.__maxheaderlen)
def _handle_multipart(self, msg, isdigest=0): # The trick here is to write out each part separately, merge them all # together, and then make sure that the boundary we've chosen isn't # present in the payload. msgtexts = [] for part in msg.get_payload(): s = StringIO() g = self.__class__(s) g(part, unixfrom=0) msgtexts...
b384e01796fad1293256262e7ab022f176afce9a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b384e01796fad1293256262e7ab022f176afce9a/Generator.py
def _handle_message_rfc822(self, msg):
def _handle_message_delivery_status(self, msg): blocks = [] for part in msg.get_payload(): s = StringIO() g = self.__class__(s, self._mangle_from_, self.__maxheaderlen) g(part, unixfrom=0) text = s.getvalue() lines = text.split('\n') if lines and lines[-1] == '': blocks.append(NL.join(lines[:-1])) else: blocks.appe...
def _handle_message_rfc822(self, msg): s = StringIO() g = self.__class__(s) # A message/rfc822 should contain a scalar payload which is another # Message object. Extract that object, stringify it, and write that # out. g(msg.get_payload(), unixfrom=0) self._fp.write(s.getvalue())
b384e01796fad1293256262e7ab022f176afce9a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b384e01796fad1293256262e7ab022f176afce9a/Generator.py
g = self.__class__(s)
g = self.__class__(s, self._mangle_from_, self.__maxheaderlen)
def _handle_message_rfc822(self, msg): s = StringIO() g = self.__class__(s) # A message/rfc822 should contain a scalar payload which is another # Message object. Extract that object, stringify it, and write that # out. g(msg.get_payload(), unixfrom=0) self._fp.write(s.getvalue())
b384e01796fad1293256262e7ab022f176afce9a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b384e01796fad1293256262e7ab022f176afce9a/Generator.py
if part.get_main_type('text') == 'text':
maintype = part.get_main_type('text') if maintype == 'text':
def _dispatch(self, msg): for part in msg.walk(): if part.get_main_type('text') == 'text': print >> self, part.get_payload(decode=1) else: print >> self, self._fmt % { 'type' : part.get_type('[no MIME type]'), 'maintype' : part.get_main_type('[no main MIME type]'), 'subtype' : part.get_subtype('[no sub-MIME ...
b384e01796fad1293256262e7ab022f176afce9a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b384e01796fad1293256262e7ab022f176afce9a/Generator.py
if terminator is None or terminator == '':
if not terminator:
def handle_read (self):
ca69f0248c94a08f2077f8e17cf6ad556a2d9d16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ca69f0248c94a08f2077f8e17cf6ad556a2d9d16/asynchat.py
elif isinstance(terminator, int):
elif isinstance(terminator, int) or isinstance(terminator, long):
def handle_read (self):
ca69f0248c94a08f2077f8e17cf6ad556a2d9d16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ca69f0248c94a08f2077f8e17cf6ad556a2d9d16/asynchat.py
>>> d._fancy_replace(['abcDefghiJkl\n'], 0, 1, ['abcdefGhijkl\n'], 0, 1) >>> print ''.join(d.results),
>>> results = d._fancy_replace(['abcDefghiJkl\n'], 0, 1, ... ['abcdefGhijkl\n'], 0, 1) >>> print ''.join(results),
def _fancy_replace(self, a, alo, ahi, b, blo, bhi): r""" When replacing one block of lines with another, search the blocks for *similar* lines; the best-matching pair (if any) is used as a synch point, and intraline difference marking is done on the similar pair. Lots of work, but often worth it.
83325e9087e1072cd51fed09896dc92a524db781 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/83325e9087e1072cd51fed09896dc92a524db781/difflib.py
>>> d._qformat('\tabcDefghiJkl\n', '\t\tabcdefGhijkl\n', ... ' ^ ^ ^ ', '+ ^ ^ ^ ') >>> for line in d.results: print repr(line)
>>> results = d._qformat('\tabcDefghiJkl\n', '\t\tabcdefGhijkl\n', ... ' ^ ^ ^ ', '+ ^ ^ ^ ') >>> for line in results: print repr(line)
def _qformat(self, aline, bline, atags, btags): r""" Format "?" output and deal with leading tabs.
83325e9087e1072cd51fed09896dc92a524db781 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/83325e9087e1072cd51fed09896dc92a524db781/difflib.py
def get_python_version ():
def get_python_version():
def get_python_version (): """Return a string containing the major and minor Python version, leaving off the patchlevel. Sample return values could be '1.5' or '2.2'. """ return sys.version[:3]
df37c8c1ad51b6f8527e2cd398788e49cd686654 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/df37c8c1ad51b6f8527e2cd398788e49cd686654/sysconfig.py
return os.path.join(prefix, "include", "python" + sys.version[:3])
return os.path.join(prefix, "include", "python" + get_python_version())
def get_python_inc(plat_specific=0, prefix=None): """Return the directory containing installed Python header files. If 'plat_specific' is false (the default), this is the path to the non-platform-specific header files, i.e. Python.h and so on; otherwise, this is the path to platform-specific header files (namely pycon...
df37c8c1ad51b6f8527e2cd398788e49cd686654 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/df37c8c1ad51b6f8527e2cd398788e49cd686654/sysconfig.py
if sys.version < "2.2":
if get_python_version() < "2.2":
def get_python_lib(plat_specific=0, standard_lib=0, prefix=None): """Return the directory containing the Python library (standard or site additions). If 'plat_specific' is true, return the directory containing platform-specific modules, i.e. any module from a non-pure-Python module distribution; otherwise, return the ...
df37c8c1ad51b6f8527e2cd398788e49cd686654 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/df37c8c1ad51b6f8527e2cd398788e49cd686654/sysconfig.py
if sys.version < '2.2':
if get_python_version() < '2.2':
def get_config_h_filename(): """Return full pathname of installed pyconfig.h file.""" if python_build: inc_dir = os.curdir else: inc_dir = get_python_inc(plat_specific=1) if sys.version < '2.2': config_h = 'config.h' else: # The name of the config.h file changed in 2.2 config_h = 'pyconfig.h' return os.path.join(inc_di...
df37c8c1ad51b6f8527e2cd398788e49cd686654 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/df37c8c1ad51b6f8527e2cd398788e49cd686654/sysconfig.py
elif sys.version < '2.1':
elif get_python_version() < '2.1':
def _init_posix(): """Initialize the module as appropriate for POSIX systems.""" g = {} # load the installed Makefile: try: filename = get_makefile_filename() parse_makefile(filename, g) except IOError, msg: my_msg = "invalid Python installation: unable to open %s" % filename if hasattr(msg, "strerror"): my_msg = my_ms...
df37c8c1ad51b6f8527e2cd398788e49cd686654 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/df37c8c1ad51b6f8527e2cd398788e49cd686654/sysconfig.py
(linkerscript, PREFIX, sys.version[0:3]))
(linkerscript, PREFIX, get_python_version()))
def _init_posix(): """Initialize the module as appropriate for POSIX systems.""" g = {} # load the installed Makefile: try: filename = get_makefile_filename() parse_makefile(filename, g) except IOError, msg: my_msg = "invalid Python installation: unable to open %s" % filename if hasattr(msg, "strerror"): my_msg = my_ms...
df37c8c1ad51b6f8527e2cd398788e49cd686654 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/df37c8c1ad51b6f8527e2cd398788e49cd686654/sysconfig.py
mbox = '/usr/mail/' + mbox
if os.path.isfile('/var/mail/' + mbox): mbox = '/var/mail/' + mbox else: mbox = '/usr/mail/' + mbox
def _test(): import sys args = sys.argv[1:] if not args: for key in 'MAILDIR', 'MAIL', 'LOGNAME', 'USER': if os.environ.has_key(key): mbox = os.environ[key] break else: print "$MAIL, $LOGNAME nor $USER set -- who are you?" return else: mbox = args[0] if mbox[:1] == '+': mbox = os.environ['HOME'] + '/Mail/' + mbox[1:] ...
03f3ee6d891e86d3744793f5d66624e52c8261d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/03f3ee6d891e86d3744793f5d66624e52c8261d5/mailbox.py
menu.configure(postcommand=self.postwindowsmenu)
WindowList.register_callback(self.postwindowsmenu)
def __init__(self, flist=None, filename=None, key=None, root=None): self.flist = flist root = root or flist.root self.root = root if flist: self.vars = flist.vars self.menubar = Menu(root) self.top = top = self.Toplevel(root, menu=self.menubar) self.vbar = vbar = Scrollbar(top, name='vbar') self.text = text = Text(top,...
c4f752f803a20948826eff4601ea595d8b74bb96 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c4f752f803a20948826eff4601ea595d8b74bb96/EditorWindow.py
import WindowList
def postwindowsmenu(self): # Only called when Windows menu exists # XXX Actually, this Just-In-Time updating interferes # XXX badly with the tear-off feature. It would be better # XXX to update all Windows menus whenever the list of windows # XXX changes. menu = self.menudict['windows'] end = menu.index("end") if end ...
c4f752f803a20948826eff4601ea595d8b74bb96 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c4f752f803a20948826eff4601ea595d8b74bb96/EditorWindow.py
- excample: the Example object that failed
- example: the Example object that failed
def output_difference(self, example, got, optionflags): """ Return a string describing the differences between the expected output for a given example (`example`) and the actual output (`got`). `optionflags` is the set of option flags used to compare `want` and `got`. """ want = example.want # If <BLANKLINE>s are bein...
d219e7f986a9b777c969614bf21967fd0c44df69 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d219e7f986a9b777c969614bf21967fd0c44df69/doctest.py
- excample: the Example object that failed
- example: the Example object that failed
def __str__(self): return str(self.test)
d219e7f986a9b777c969614bf21967fd0c44df69 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d219e7f986a9b777c969614bf21967fd0c44df69/doctest.py
f2 = self.tar.extractfile("S-SPARSE-WITH-NULLS")
f2 = self.tar.extractfile("/S-SPARSE-WITH-NULLS")
def test_sparse(self): """Test sparse member extraction. """ if self.sep != "|": f1 = self.tar.extractfile("S-SPARSE") f2 = self.tar.extractfile("S-SPARSE-WITH-NULLS") self.assert_(f1.read() == f2.read(), "_FileObject failed on sparse file member")
c7fcc2d772c6ccaa71002aaa2aace16ed8adf471 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c7fcc2d772c6ccaa71002aaa2aace16ed8adf471/test_tarfile.py
filename = "0-REGTYPE-TEXT"
filename = "/0-REGTYPE-TEXT"
def test_readlines(self): """Test readlines() method of _FileObject. """ if self.sep != "|": filename = "0-REGTYPE-TEXT" self.tar.extract(filename, dirname()) lines1 = file(os.path.join(dirname(), filename), "r").readlines() lines2 = self.tar.extractfile(filename).readlines() self.assert_(lines1 == lines2, "_FileObject...
c7fcc2d772c6ccaa71002aaa2aace16ed8adf471 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c7fcc2d772c6ccaa71002aaa2aace16ed8adf471/test_tarfile.py
lines1 = file(os.path.join(dirname(), filename), "r").readlines()
lines1 = file(os.path.join(dirname(), filename), "rU").readlines()
def test_readlines(self): """Test readlines() method of _FileObject. """ if self.sep != "|": filename = "0-REGTYPE-TEXT" self.tar.extract(filename, dirname()) lines1 = file(os.path.join(dirname(), filename), "r").readlines() lines2 = self.tar.extractfile(filename).readlines() self.assert_(lines1 == lines2, "_FileObject...
c7fcc2d772c6ccaa71002aaa2aace16ed8adf471 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c7fcc2d772c6ccaa71002aaa2aace16ed8adf471/test_tarfile.py
filename = "0-REGTYPE"
filename = "/0-REGTYPE"
def test_seek(self): """Test seek() method of _FileObject, incl. random reading. """ if self.sep != "|": filename = "0-REGTYPE" self.tar.extract(filename, dirname()) data = file(os.path.join(dirname(), filename), "rb").read()
c7fcc2d772c6ccaa71002aaa2aace16ed8adf471 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c7fcc2d772c6ccaa71002aaa2aace16ed8adf471/test_tarfile.py
def __getitem__(self, i): if i < 0 or i > 2: raise IndexError return i + 4
39a86c2188b22818c187e860fbf7d77a28a6a116 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/39a86c2188b22818c187e860fbf7d77a28a6a116/test_b2.py
includes = ['-I' + incldir, '-I' + binlib]
includes = ['-I' + incldir, '-I' + config_h_dir]
def main(): # overridable context prefix = None # settable with -p option exec_prefix = None # settable with -P option extensions = [] exclude = [] # settable with -x option addn_link = [] # settable with -l, but only honored under Windows. path = sys.p...
590fc2c4fa9f831d5a1e5f7f3b59135f74f7e4ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/590fc2c4fa9f831d5a1e5f7f3b59135f74f7e4ec/freeze.py
def testmod(m, name=None, globs=None, verbose=None, isprivate=None,
def testmod(m=None, name=None, globs=None, verbose=None, isprivate=None,
def testmod(m, name=None, globs=None, verbose=None, isprivate=None, report=1): """m, name=None, globs=None, verbose=None, isprivate=None, report=1 Test examples in docstrings in functions and classes reachable from module m, starting with m.__doc__. Private names are skipped. Also test examples reachable from dict m...
4581cfa326cf7d8b9d7888d4c0e96ee88950bcfa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4581cfa326cf7d8b9d7888d4c0e96ee88950bcfa/doctest.py
"""m, name=None, globs=None, verbose=None, isprivate=None, report=1 Test examples in docstrings in functions and classes reachable from module m, starting with m.__doc__. Private names are skipped.
"""m=None, name=None, globs=None, verbose=None, isprivate=None, report=1 Test examples in docstrings in functions and classes reachable from module m (or the current module if m is not supplied), starting with m.__doc__. Private names are skipped.
def testmod(m, name=None, globs=None, verbose=None, isprivate=None, report=1): """m, name=None, globs=None, verbose=None, isprivate=None, report=1 Test examples in docstrings in functions and classes reachable from module m, starting with m.__doc__. Private names are skipped. Also test examples reachable from dict m...
4581cfa326cf7d8b9d7888d4c0e96ee88950bcfa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4581cfa326cf7d8b9d7888d4c0e96ee88950bcfa/doctest.py
class ResFunction(ResMixIn, OSErrFunctionGenerator): pass class ResMethod(ResMixIn, OSErrMethodGenerator): pass
class ResFunction(ResMixIn, OSErrWeakLinkFunctionGenerator): pass class ResMethod(ResMixIn, OSErrWeakLinkMethodGenerator): pass
def checkit(self): if self.returntype.__class__ != OSErrType: OutLbrace() Output("OSErr _err = ResError();") Output("if (_err != noErr) return PyMac_Error(_err);") OutRbrace() FunctionGenerator.checkit(self) # XXX
150ed6113ce0e6558eafa27149e75e1463df20df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/150ed6113ce0e6558eafa27149e75e1463df20df/ressupport.py
if m[0] != '_' and m != 'config':
if m[0] != '_' and m != 'config' and m != 'configure':
def __init__(self, master=None, cnf={}, **kw): if kw: cnf = _cnfmerge((cnf, kw)) fcnf = {} for k in cnf.keys(): if type(k) == ClassType or k == 'name': fcnf[k] = cnf[k] del cnf[k] self.frame = apply(Frame, (master,), fcnf) self.vbar = Scrollbar(self.frame, name='vbar') self.vbar.pack(side=RIGHT, fill=Y) cnf['name'] = '...
7f9732880ea24539e9c011e2c73bb9afb7ee316c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7f9732880ea24539e9c011e2c73bb9afb7ee316c/ScrolledText.py
self.name = name
self.name = os.path.abspath(name)
def __init__(self, name=None, mode="r", fileobj=None): """Open an (uncompressed) tar archive `name'. `mode' is either 'r' to read from an existing archive, 'a' to append data to an existing file or 'w' to create a new file overwriting an existing one. `mode' defaults to 'r'. If `fileobj' is given, it is used for readin...
bc3b06087cf1907d1dfee6e21885a9ccfbf11af3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bc3b06087cf1907d1dfee6e21885a9ccfbf11af3/tarfile.py
self.name = fileobj.name
self.name = os.path.abspath(fileobj.name)
def __init__(self, name=None, mode="r", fileobj=None): """Open an (uncompressed) tar archive `name'. `mode' is either 'r' to read from an existing archive, 'a' to append data to an existing file or 'w' to create a new file overwriting an existing one. `mode' defaults to 'r'. If `fileobj' is given, it is used for readin...
bc3b06087cf1907d1dfee6e21885a9ccfbf11af3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bc3b06087cf1907d1dfee6e21885a9ccfbf11af3/tarfile.py
pre = os.path.basename(pre)
def gzopen(cls, name, mode="r", fileobj=None, compresslevel=9): """Open gzip compressed tar archive name for reading or writing. Appending is not allowed. """ if len(mode) > 1 or mode not in "rw": raise ValueError, "mode must be 'r' or 'w'"
bc3b06087cf1907d1dfee6e21885a9ccfbf11af3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bc3b06087cf1907d1dfee6e21885a9ccfbf11af3/tarfile.py
tarname = pre + ext
tarname = os.path.basename(pre + ext)
def gzopen(cls, name, mode="r", fileobj=None, compresslevel=9): """Open gzip compressed tar archive name for reading or writing. Appending is not allowed. """ if len(mode) > 1 or mode not in "rw": raise ValueError, "mode must be 'r' or 'w'"
bc3b06087cf1907d1dfee6e21885a9ccfbf11af3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bc3b06087cf1907d1dfee6e21885a9ccfbf11af3/tarfile.py
if mode != "r": name = tarname
def gzopen(cls, name, mode="r", fileobj=None, compresslevel=9): """Open gzip compressed tar archive name for reading or writing. Appending is not allowed. """ if len(mode) > 1 or mode not in "rw": raise ValueError, "mode must be 'r' or 'w'"
bc3b06087cf1907d1dfee6e21885a9ccfbf11af3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bc3b06087cf1907d1dfee6e21885a9ccfbf11af3/tarfile.py
t = cls.taropen(tarname, mode, gzip.GzipFile(name, mode, compresslevel, fileobj)
t = cls.taropen(name, mode, gzip.GzipFile(tarname, mode, compresslevel, fileobj)
def gzopen(cls, name, mode="r", fileobj=None, compresslevel=9): """Open gzip compressed tar archive name for reading or writing. Appending is not allowed. """ if len(mode) > 1 or mode not in "rw": raise ValueError, "mode must be 'r' or 'w'"
bc3b06087cf1907d1dfee6e21885a9ccfbf11af3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bc3b06087cf1907d1dfee6e21885a9ccfbf11af3/tarfile.py
pre, ext = os.path.splitext(name) pre = os.path.basename(pre) if ext == ".tbz2": ext = ".tar" if ext == ".bz2": ext = "" tarname = pre + ext
def bz2open(cls, name, mode="r", fileobj=None, compresslevel=9): """Open bzip2 compressed tar archive name for reading or writing. Appending is not allowed. """ if len(mode) > 1 or mode not in "rw": raise ValueError, "mode must be 'r' or 'w'."
bc3b06087cf1907d1dfee6e21885a9ccfbf11af3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bc3b06087cf1907d1dfee6e21885a9ccfbf11af3/tarfile.py
t = cls.taropen(tarname, mode, bz2.BZ2File(name, mode, compresslevel=compresslevel))
t = cls.taropen(name, mode, bz2.BZ2File(name, mode, compresslevel=compresslevel))
def bz2open(cls, name, mode="r", fileobj=None, compresslevel=9): """Open bzip2 compressed tar archive name for reading or writing. Appending is not allowed. """ if len(mode) > 1 or mode not in "rw": raise ValueError, "mode must be 'r' or 'w'."
bc3b06087cf1907d1dfee6e21885a9ccfbf11af3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bc3b06087cf1907d1dfee6e21885a9ccfbf11af3/tarfile.py
if self.name is not None \ and os.path.abspath(name) == os.path.abspath(self.name):
if self.name is not None and os.path.samefile(name, self.name):
def add(self, name, arcname=None, recursive=True): """Add the file `name' to the archive. `name' may be any type of file (directory, fifo, symbolic link, etc.). If given, `arcname' specifies an alternative name for the file in the archive. Directories are added recursively by default. This can be avoided by setting `re...
bc3b06087cf1907d1dfee6e21885a9ccfbf11af3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bc3b06087cf1907d1dfee6e21885a9ccfbf11af3/tarfile.py
def AS_TYPE_64BIT(as_): return \
def AS_TYPE_64BIT(as): return \
def AS_TYPE_64BIT(as_): return \
553a0296e93ee387ee04b27b3ba408f33e63dc8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/553a0296e93ee387ee04b27b3ba408f33e63dc8b/STROPTS.py
_tryorder = ["galeon", "mozilla", "netscape", "kfm", "grail", "links", "lynx", "w3m",]
_tryorder = ["links", "lynx", "w3m"]
def open_new(self, url): self.open(url)
1456fde6a0d21cef0d78250c7d0f996772530502 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1456fde6a0d21cef0d78250c7d0f996772530502/webbrowser.py
if y.hasattr('__setstate__'):
if hasattr(y, '__setstate__'):
def _copy_inst(x): if hasattr(x, '__copy__'): return x.__copy__() if hasattr(x, '__getinitargs__'): args = x.__getinitargs__() else: args = () y = apply(x.__class__, args) if hasattr(x, '__getstate__'): state = x.__getstate__() else: state = x.__dict__ if y.hasattr('__setstate__'): y.__setstate__(state) else: for key i...
fefbbe508582d6cd057e6e8e1be89607203076a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fefbbe508582d6cd057e6e8e1be89607203076a9/copy.py
if y.hasattr('__setstate__'):
if hasattr(y, '__setstate__'):
def _deepcopy_inst(x, memo): if hasattr(x, '__deepcopy__'): return x.__deepcopy__() if hasattr(x, '__getinitargs__'): args = x.__getinitargs__() args = deepcopy(args, memo) else: args = () y = apply(x.__class__, args) memo[id(x)] = y if hasattr(x, '__getstate__'): state = x.__getstate__() else: state = x.__dict__ state...
fefbbe508582d6cd057e6e8e1be89607203076a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fefbbe508582d6cd057e6e8e1be89607203076a9/copy.py
outfile.write(" ")
outfile.write(" ")
def write_results_file(self, path, lines, lnotab, lines_hit): """Return a coverage results file in path."""
c171172614f77190a6b729cd834c27a58eb9aa41 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c171172614f77190a6b729cd834c27a58eb9aa41/trace.py
raise UnimplementedError
raise NotImplementedError
def process_message(self, peer, mailfrom, rcpttos, data): """Override this abstract method to handle messages from the client.
b8b45eac7118cdfb8b9f87c31718023fe5ed29e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b8b45eac7118cdfb8b9f87c31718023fe5ed29e1/smtpd.py
self._tofill = []
def reset(self): """ Clear the screen, re-center the pen, and set variables to the default values.
06c68b800ca3e31d2551923083ce8294ab94cb24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/06c68b800ca3e31d2551923083ce8294ab94cb24/turtle.py
if self._tofill: for item in self._tofill: self._canvas.itemconfigure(item, fill=self._color) self._items.append(item)
def fill(self, flag): """ Call fill(1) before drawing the shape you want to fill, and fill(0) when done.
06c68b800ca3e31d2551923083ce8294ab94cb24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/06c68b800ca3e31d2551923083ce8294ab94cb24/turtle.py
self._tofill = []
def fill(self, flag): """ Call fill(1) before drawing the shape you want to fill, and fill(0) when done.
06c68b800ca3e31d2551923083ce8294ab94cb24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/06c68b800ca3e31d2551923083ce8294ab94cb24/turtle.py
self.forward(0)
def fill(self, flag): """ Call fill(1) before drawing the shape you want to fill, and fill(0) when done.
06c68b800ca3e31d2551923083ce8294ab94cb24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/06c68b800ca3e31d2551923083ce8294ab94cb24/turtle.py
self.fill(1)
self._path = [self._position] self._filling = 1
def begin_fill(self): """ Called just before drawing a shape to be filled.
06c68b800ca3e31d2551923083ce8294ab94cb24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/06c68b800ca3e31d2551923083ce8294ab94cb24/turtle.py
color("green") left(130)
left(120)
def demo2(): # exercises some new and improved features speed('fast') width(3) # draw a segmented half-circle setheading(towards(0,0)) x,y = position() r = (x**2+y**2)**.5/2.0 right(90) pendown = True for i in range(18): if pendown: up() pendown = False else: down() pendown = True circle(r,10) sleep(2) reset() left(9...
06c68b800ca3e31d2551923083ce8294ab94cb24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/06c68b800ca3e31d2551923083ce8294ab94cb24/turtle.py
forward(90)
forward(70) right(30) down()
def demo2(): # exercises some new and improved features speed('fast') width(3) # draw a segmented half-circle setheading(towards(0,0)) x,y = position() r = (x**2+y**2)**.5/2.0 right(90) pendown = True for i in range(18): if pendown: up() pendown = False else: down() pendown = True circle(r,10) sleep(2) reset() left(9...
06c68b800ca3e31d2551923083ce8294ab94cb24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/06c68b800ca3e31d2551923083ce8294ab94cb24/turtle.py
speed('fastest')
speed("fastest") fill(1) for i in range(4): circle(50,90) right(90) forward(30) right(90) color("yellow") fill(0) left(90) up() forward(30)
def demo2(): # exercises some new and improved features speed('fast') width(3) # draw a segmented half-circle setheading(towards(0,0)) x,y = position() r = (x**2+y**2)**.5/2.0 right(90) pendown = True for i in range(18): if pendown: up() pendown = False else: down() pendown = True circle(r,10) sleep(2) reset() left(9...
06c68b800ca3e31d2551923083ce8294ab94cb24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/06c68b800ca3e31d2551923083ce8294ab94cb24/turtle.py
def __init__(self):
def __init__(self, verbose=0): self.verbose = verbose
def __init__(self): self.reset()
3c0bfd0deeadccf10c8982d5b42dd39f63fb727e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3c0bfd0deeadccf10c8982d5b42dd39f63fb727e/sgmllib.py
if j == n: break
if j == n or rawdata[i:i+2] == '<!': break
def goahead(self, end): rawdata = self.rawdata i = 0 n = len(rawdata) while i < n: if self.nomoretags: self.handle_data(rawdata[i:n]) i = n break j = incomplete.search(rawdata, i) if j < 0: j = n if i < j: self.handle_data(rawdata[i:j]) i = j if i == n: break if rawdata[i] == '<': if starttagopen.match(rawdata, i) >= 0...
3c0bfd0deeadccf10c8982d5b42dd39f63fb727e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3c0bfd0deeadccf10c8982d5b42dd39f63fb727e/sgmllib.py
print '*** Unbalanced </' + tag + '>' print '*** Stack:', self.stack
if self.verbose: print '*** Unbalanced </' + tag + '>' print '*** Stack:', self.stack
def report_unbalanced(self, tag): print '*** Unbalanced </' + tag + '>' print '*** Stack:', self.stack
3c0bfd0deeadccf10c8982d5b42dd39f63fb727e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3c0bfd0deeadccf10c8982d5b42dd39f63fb727e/sgmllib.py
name = string.lower(name)
def handle_entityref(self, name): table = self.entitydefs name = string.lower(name) if table.has_key(name): self.handle_data(table[name]) else: self.unknown_entityref(name) return
3c0bfd0deeadccf10c8982d5b42dd39f63fb727e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3c0bfd0deeadccf10c8982d5b42dd39f63fb727e/sgmllib.py
@contextmanager
@contextfactory
def contextfactory(func): """@contextfactory decorator. Typical usage: @contextmanager def some_generator(<arguments>): <setup> try: yield <value> finally: <cleanup> This makes this: with some_generator(<arguments>) as <variable>: <body> equivalent to this: <setup> try: <variable> = <value> <body> finally: <clean...
1e0139753361f7fb820e63950b04203dc02e803c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1e0139753361f7fb820e63950b04203dc02e803c/contextlib.py
if 0: not sys.platform.startswith('win'):
if 0:
def test_basic(): test_support.requires('network') import urllib socket.RAND_status() try: socket.RAND_egd(1) except TypeError: pass else: print "didn't raise TypeError" socket.RAND_add("this is a random string", 75.0) f = urllib.urlopen('https://sf.net') buf = f.read() f.close()
d8eaa49092f60dd6c5a6ea028e8b406e45594031 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d8eaa49092f60dd6c5a6ea028e8b406e45594031/test_socket_ssl.py
exts.append( Extension('nis', ['nismodule.c'], libraries = ['nsl']) )
libs = ['nsl'] else: libs = [] exts.append( Extension('nis', ['nismodule.c'], libraries = libs) )
def detect_modules(self): # Ensure that /usr/local is always used if '/usr/local/lib' not in self.compiler.library_dirs: self.compiler.library_dirs.append('/usr/local/lib') if '/usr/local/include' not in self.compiler.include_dirs: self.compiler.include_dirs.append( '/usr/local/include' )
cf393f3fd9759ffac71c816f97ea01780848512c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cf393f3fd9759ffac71c816f97ea01780848512c/setup.py
print " setting options:" for (option, (source, value)) in options.items(): print " %s = %s (from %s)" % (option, value, source) if not hasattr(cmd_obj, option): raise DistutilsOptionError, \ ("%s: command '%s' has no such option '%s'") % \ (source, command, option) setattr(cmd_obj, option, value)
self._set_command_options(cmd_obj, options)
def get_command_obj (self, command, create=1): """Return the command object for 'command'. Normally this object is cached on a previous call to 'get_command_obj()'; if no comand object for 'command' is in the cache, then we either create and return it (if 'create' is true) or return None. """ cmd_obj = self.command_ob...
c32d9a69527af6d2823650ea7674e207c975f090 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c32d9a69527af6d2823650ea7674e207c975f090/dist.py
def randrange(self, start, stop=None, step=1, int=int, default=None): """Choose a random item from range(start, stop[, step]).
9146f27b7799dab231083f194a14c6157b57549f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9146f27b7799dab231083f194a14c6157b57549f/random.py
if istart < istop: return istart + int(self.random() * (istop - istart))
def randrange(self, start, stop=None, step=1, int=int, default=None): """Choose a random item from range(start, stop[, step]).
9146f27b7799dab231083f194a14c6157b57549f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9146f27b7799dab231083f194a14c6157b57549f/random.py
"Test MCRYPT type miscelaneous methods."
"Test BZ2File type miscellaneous methods."
def decompress(self, data): return bz2.decompress(data)
33a5f2af59ddcf3f1b0447a8dbd0576fd78de303 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/33a5f2af59ddcf3f1b0447a8dbd0576fd78de303/test_bz2.py
return "0L"
return "0"
def slow_format(self, x, base): if (x, base) == (0, 8): # this is an oddball! return "0L" digits = [] sign = 0 if x < 0: sign, x = 1, -x while x: x, r = divmod(x, base) digits.append(int(r)) digits.reverse() digits = digits or [0] return '-'[:sign] + \ {8: '0', 10: '', 16: '0x'}[base] + \ "".join(map(lambda i: "0123456...
d2dbecb4ae9177e2e87adcb047147c6bcbf28cc1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d2dbecb4ae9177e2e87adcb047147c6bcbf28cc1/test_long.py
"".join(map(lambda i: "0123456789abcdef"[i], digits)) + "L"
"".join(map(lambda i: "0123456789abcdef"[i], digits))
def slow_format(self, x, base): if (x, base) == (0, 8): # this is an oddball! return "0L" digits = [] sign = 0 if x < 0: sign, x = 1, -x while x: x, r = divmod(x, base) digits.append(int(r)) digits.reverse() digits = digits or [0] return '-'[:sign] + \ {8: '0', 10: '', 16: '0x'}[base] + \ "".join(map(lambda i: "0123456...
d2dbecb4ae9177e2e87adcb047147c6bcbf28cc1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d2dbecb4ae9177e2e87adcb047147c6bcbf28cc1/test_long.py
expected = self.slow_format(x, 10)[:-1]
expected = self.slow_format(x, 10)
def check_format_1(self, x): for base, mapper in (8, oct), (10, repr), (16, hex): got = mapper(x) expected = self.slow_format(x, base) msg = Frm("%s returned %r but expected %r for %r", mapper.__name__, got, expected, x) self.assertEqual(got, expected, msg) self.assertEqual(long(got, 0), x, Frm('long("%s", 0) != %r', g...
d2dbecb4ae9177e2e87adcb047147c6bcbf28cc1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/d2dbecb4ae9177e2e87adcb047147c6bcbf28cc1/test_long.py
print >>sys.stderr, "l1=%r, l2=%r, ignore=%r" % (l1, l2, ignore)
print >>sys.stderr, "l1=%r\nl2=%r\nignore=%r" % (l1, l2, ignore)
def assertListEq(self, l1, l2, ignore): ''' succeed iff {l1} - {ignore} == {l2} - {ignore} ''' try: for p1, p2 in (l1, l2), (l2, l1): for item in p1: ok = (item in p2) or (item in ignore) if not ok: self.fail("%r missing" % item) except: print >>sys.stderr, "l1=%r, l2=%r, ignore=%r" % (l1, l2, ignore) raise
7f6a4390408e28e9c3cc3e1bb32f3908ba969091 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7f6a4390408e28e9c3cc3e1bb32f3908ba969091/test_pyclbr.py
if type(getattr(py_item, m)) == MethodType:
if ismethod(getattr(py_item, m), m):
def checkModule(self, moduleName, module=None, ignore=()): ''' succeed iff pyclbr.readmodule_ex(modulename) corresponds to the actual module object, module. Any identifiers in ignore are ignored. If no module is provided, the appropriate module is loaded with __import__.'''
7f6a4390408e28e9c3cc3e1bb32f3908ba969091 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7f6a4390408e28e9c3cc3e1bb32f3908ba969091/test_pyclbr.py
self.assertListEq(foundMethods, actualMethods, ignore) self.assertEquals(py_item.__module__, value.module)
try: self.assertListEq(foundMethods, actualMethods, ignore) self.assertEquals(py_item.__module__, value.module)
def checkModule(self, moduleName, module=None, ignore=()): ''' succeed iff pyclbr.readmodule_ex(modulename) corresponds to the actual module object, module. Any identifiers in ignore are ignored. If no module is provided, the appropriate module is loaded with __import__.'''
7f6a4390408e28e9c3cc3e1bb32f3908ba969091 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7f6a4390408e28e9c3cc3e1bb32f3908ba969091/test_pyclbr.py
self.assertEquals(py_item.__name__, value.name, ignore)
self.assertEquals(py_item.__name__, value.name, ignore) except: print >>sys.stderr, "class=%s" % py_item raise
def checkModule(self, moduleName, module=None, ignore=()): ''' succeed iff pyclbr.readmodule_ex(modulename) corresponds to the actual module object, module. Any identifiers in ignore are ignored. If no module is provided, the appropriate module is loaded with __import__.'''
7f6a4390408e28e9c3cc3e1bb32f3908ba969091 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7f6a4390408e28e9c3cc3e1bb32f3908ba969091/test_pyclbr.py
self.checkModule('doctest', ignore=['_isclass', '_isfunction', '_ismodule', '_classify_class_attrs']) self.checkModule('rfc822', ignore=["get"])
self.checkModule('doctest') self.checkModule('rfc822')
def test_easy(self): self.checkModule('pyclbr') self.checkModule('doctest', ignore=['_isclass', '_isfunction', '_ismodule', '_classify_class_attrs']) self.checkModule('rfc822', ignore=["get"]) self.checkModule('difflib')
7f6a4390408e28e9c3cc3e1bb32f3908ba969091 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7f6a4390408e28e9c3cc3e1bb32f3908ba969091/test_pyclbr.py
def test_others(self): cm = self.checkModule
7f6a4390408e28e9c3cc3e1bb32f3908ba969091 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7f6a4390408e28e9c3cc3e1bb32f3908ba969091/test_pyclbr.py
cm('cgi', ignore=('f', 'g', 'log')) cm('mhlib', ignore=('do', 'bisect')) cm('urllib', ignore=('getproxies_environment', 'getproxies_registry', 'open_https')) cm('pickle', ignore=('g',)) cm('aifc', ignore=('openfp',)) cm('Cookie', ignore=('__str__', 'Cookie')) cm('sre_parse', ignore=('literal', 'makedict', 'dump'...
cm('cgi', ignore=('log',)) cm('mhlib') cm('urllib', ignore=('getproxies_registry', 'open_https')) cm('pickle', ignore=('g',)) cm('aifc', ignore=('openfp',)) cm('Cookie') cm('sre_parse', ignore=('dump',)) cm('pdb') cm('pydoc')
def test_others(self): cm = self.checkModule
7f6a4390408e28e9c3cc3e1bb32f3908ba969091 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7f6a4390408e28e9c3cc3e1bb32f3908ba969091/test_pyclbr.py
cm('test.test_pyclbr', ignore=('defined_in',))
cm('test.test_pyclbr')
def test_others(self): cm = self.checkModule
7f6a4390408e28e9c3cc3e1bb32f3908ba969091 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7f6a4390408e28e9c3cc3e1bb32f3908ba969091/test_pyclbr.py
""" Check whether 'str' contains ANY of the chars in 'set' """
"""Check whether 'str' contains ANY of the chars in 'set'"""
def containsAny(str, set): """ Check whether 'str' contains ANY of the chars in 'set' """ return 1 in [c in str for c in set]
e04ee70a68045f8d229ab59ad9b0256d0278c745 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e04ee70a68045f8d229ab59ad9b0256d0278c745/pygettext.py
""" Helper for getFilesForName(). """
"""Helper for getFilesForName()."""
def _visit_pyfiles(list, dirname, names): """ Helper for getFilesForName(). """ # get extension for python source files if not globals().has_key('_py_ext'): import imp global _py_ext _py_ext = [triple[0] for triple in imp.get_suffixes() if triple[2] == imp.PY_SOURCE][0] # don't recurse into CVS directories if 'CVS' in...
e04ee70a68045f8d229ab59ad9b0256d0278c745 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e04ee70a68045f8d229ab59ad9b0256d0278c745/pygettext.py
import imp
def _visit_pyfiles(list, dirname, names): """ Helper for getFilesForName(). """ # get extension for python source files if not globals().has_key('_py_ext'): import imp global _py_ext _py_ext = [triple[0] for triple in imp.get_suffixes() if triple[2] == imp.PY_SOURCE][0] # don't recurse into CVS directories if 'CVS' in...
e04ee70a68045f8d229ab59ad9b0256d0278c745 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e04ee70a68045f8d229ab59ad9b0256d0278c745/pygettext.py
_py_ext = [triple[0] for triple in imp.get_suffixes() if triple[2] == imp.PY_SOURCE][0]
_py_ext = [triple[0] for triple in imp.get_suffixes() if triple[2] == imp.PY_SOURCE][0]
def _visit_pyfiles(list, dirname, names): """ Helper for getFilesForName(). """ # get extension for python source files if not globals().has_key('_py_ext'): import imp global _py_ext _py_ext = [triple[0] for triple in imp.get_suffixes() if triple[2] == imp.PY_SOURCE][0] # don't recurse into CVS directories if 'CVS' in...
e04ee70a68045f8d229ab59ad9b0256d0278c745 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e04ee70a68045f8d229ab59ad9b0256d0278c745/pygettext.py
[os.path.join(dirname, file) for file in names if os.path.splitext(file)[1] == _py_ext])
[os.path.join(dirname, file) for file in names if os.path.splitext(file)[1] == _py_ext] )
def _visit_pyfiles(list, dirname, names): """ Helper for getFilesForName(). """ # get extension for python source files if not globals().has_key('_py_ext'): import imp global _py_ext _py_ext = [triple[0] for triple in imp.get_suffixes() if triple[2] == imp.PY_SOURCE][0] # don't recurse into CVS directories if 'CVS' in...
e04ee70a68045f8d229ab59ad9b0256d0278c745 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e04ee70a68045f8d229ab59ad9b0256d0278c745/pygettext.py
""" Get the filesystem path for a module or a package. Return the file system path to a file for a module, and to a directory for a package. Return None if the name is not found, or is a builtin or extension module.
"""Get the filesystem path for a module or a package. Return the file system path to a file for a module, and to a directory for a package. Return None if the name is not found, or is a builtin or extension module.
def _get_modpkg_path(dotted_name, pathlist=None): """ Get the filesystem path for a module or a package. Return the file system path to a file for a module, and to a directory for a package. Return None if the name is not found, or is a builtin or extension module. """ import imp # split off top-most name parts = dot...
e04ee70a68045f8d229ab59ad9b0256d0278c745 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e04ee70a68045f8d229ab59ad9b0256d0278c745/pygettext.py
import imp
def _get_modpkg_path(dotted_name, pathlist=None): """ Get the filesystem path for a module or a package. Return the file system path to a file for a module, and to a directory for a package. Return None if the name is not found, or is a builtin or extension module. """ import imp # split off top-most name parts = dot...
e04ee70a68045f8d229ab59ad9b0256d0278c745 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e04ee70a68045f8d229ab59ad9b0256d0278c745/pygettext.py
file, pathname, description = imp.find_module(dotted_name, pathlist) if file: file.close()
file, pathname, description = imp.find_module( dotted_name, pathlist) if file: file.close()
def _get_modpkg_path(dotted_name, pathlist=None): """ Get the filesystem path for a module or a package. Return the file system path to a file for a module, and to a directory for a package. Return None if the name is not found, or is a builtin or extension module. """ import imp # split off top-most name parts = dot...
e04ee70a68045f8d229ab59ad9b0256d0278c745 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e04ee70a68045f8d229ab59ad9b0256d0278c745/pygettext.py
""" Get a list of module files for a filename, a module or package name, or a directory.
"""Get a list of module files for a filename, a module or package name, or a directory.
def getFilesForName(name): """ Get a list of module files for a filename, a module or package name, or a directory. """ import imp if not os.path.exists(name): # check for glob chars if containsAny(name, "*?[]"): import glob files = glob.glob(name) list = [] for file in files: list.extend(getFilesForName(file)) return...
e04ee70a68045f8d229ab59ad9b0256d0278c745 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e04ee70a68045f8d229ab59ad9b0256d0278c745/pygettext.py
import imp
def getFilesForName(name): """ Get a list of module files for a filename, a module or package name, or a directory. """ import imp if not os.path.exists(name): # check for glob chars if containsAny(name, "*?[]"): import glob files = glob.glob(name) list = [] for file in files: list.extend(getFilesForName(file)) return...
e04ee70a68045f8d229ab59ad9b0256d0278c745 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e04ee70a68045f8d229ab59ad9b0256d0278c745/pygettext.py
import glob
def getFilesForName(name): """ Get a list of module files for a filename, a module or package name, or a directory. """ import imp if not os.path.exists(name): # check for glob chars if containsAny(name, "*?[]"): import glob files = glob.glob(name) list = [] for file in files: list.extend(getFilesForName(file)) return...
e04ee70a68045f8d229ab59ad9b0256d0278c745 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e04ee70a68045f8d229ab59ad9b0256d0278c745/pygettext.py
def __openseen(self, ttype, tstring, lineno): if ttype == tokenize.OP and tstring == ')': # We've seen the last of the translatable strings. Record the # line number of the first line of the strings and update the list # of messages seen. Reset state for the next batch. If there # were no strings inside _(), then ju...
e04ee70a68045f8d229ab59ad9b0256d0278c745 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e04ee70a68045f8d229ab59ad9b0256d0278c745/pygettext.py