PATH:
lib64
/
python2.7
/
test
# -*- coding: utf-8 -*- from test.test_support import ( verbose, run_unittest, import_module, precisionbigmemtest, _2G, cpython_only, captured_stdout, have_unicode, requires_unicode, u, check_warnings, check_py3k_warnings) import locale import re from re import Scanner import sre_constants import sys import string import traceback from weakref import proxy # Misc tests from Tim Peters' re.doc # WARNING: Don't change details in these tests if you don't know # what you're doing. Some of these tests were carefully modeled to # cover most of the code. import unittest class ReTests(unittest.TestCase): def test_weakref(self): s = 'QabbbcR' x = re.compile('ab+c') y = proxy(x) self.assertEqual(x.findall('QabbbcR'), y.findall('QabbbcR')) def test_search_star_plus(self): self.assertEqual(re.search('x*', 'axx').span(0), (0, 0)) self.assertEqual(re.search('x*', 'axx').span(), (0, 0)) self.assertEqual(re.search('x+', 'axx').span(0), (1, 3)) self.assertEqual(re.search('x+', 'axx').span(), (1, 3)) self.assertIsNone(re.search('x', 'aaa')) self.assertEqual(re.match('a*', 'xxx').span(0), (0, 0)) self.assertEqual(re.match('a*', 'xxx').span(), (0, 0)) self.assertEqual(re.match('x*', 'xxxa').span(0), (0, 3)) self.assertEqual(re.match('x*', 'xxxa').span(), (0, 3)) self.assertIsNone(re.match('a+', 'xxx')) def bump_num(self, matchobj): int_value = int(matchobj.group(0)) return str(int_value + 1) def test_basic_re_sub(self): self.assertEqual(re.sub("(?i)b+", "x", "bbbb BBBB"), 'x x') self.assertEqual(re.sub(r'\d+', self.bump_num, '08.2 -2 23x99y'), '9.3 -3 24x100y') self.assertEqual(re.sub(r'\d+', self.bump_num, '08.2 -2 23x99y', 3), '9.3 -3 23x99y') self.assertEqual(re.sub('.', lambda m: r"\n", 'x'), '\\n') self.assertEqual(re.sub('.', r"\n", 'x'), '\n') s = r"\1\1" self.assertEqual(re.sub('(.)', s, 'x'), 'xx') self.assertEqual(re.sub('(.)', s.replace('\\', r'\\'), 'x'), s) self.assertEqual(re.sub('(.)', lambda m: s, 'x'), s) self.assertEqual(re.sub('(?P<a>x)', '\g<a>\g<a>', 'xx'), 'xxxx') self.assertEqual(re.sub('(?P<a>x)', '\g<a>\g<1>', 'xx'), 'xxxx') self.assertEqual(re.sub('(?P<unk>x)', '\g<unk>\g<unk>', 'xx'), 'xxxx') self.assertEqual(re.sub('(?P<unk>x)', '\g<1>\g<1>', 'xx'), 'xxxx') self.assertEqual(re.sub('a', r'\t\n\v\r\f\a\b', 'a'), '\t\n\v\r\f\a\b') self.assertEqual(re.sub('a', '\t\n\v\r\f\a\b', 'a'), '\t\n\v\r\f\a\b') self.assertEqual(re.sub('a', '\t\n\v\r\f\a\b', 'a'), (chr(9)+chr(10)+chr(11)+chr(13)+chr(12)+chr(7)+chr(8))) for c in 'cdehijklmopqsuwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ': with check_py3k_warnings(): self.assertEqual(re.sub('a', '\\' + c, 'a'), '\\' + c) self.assertEqual(re.sub('^\s*', 'X', 'test'), 'Xtest') def test_bug_449964(self): # fails for group followed by other escape self.assertEqual(re.sub(r'(?P<unk>x)', '\g<1>\g<1>\\b', 'xx'), 'xx\bxx\b') def test_bug_449000(self): # Test for sub() on escaped characters self.assertEqual(re.sub(r'\r\n', r'\n', 'abc\r\ndef\r\n'), 'abc\ndef\n') self.assertEqual(re.sub('\r\n', r'\n', 'abc\r\ndef\r\n'), 'abc\ndef\n') self.assertEqual(re.sub(r'\r\n', '\n', 'abc\r\ndef\r\n'), 'abc\ndef\n') self.assertEqual(re.sub('\r\n', '\n', 'abc\r\ndef\r\n'), 'abc\ndef\n') @requires_unicode def test_bug_1140(self): # re.sub(x, y, u'') should return u'', not '', and # re.sub(x, y, '') should return '', not u''. # Also: # re.sub(x, y, unicode(x)) should return unicode(y), and # re.sub(x, y, str(x)) should return # str(y) if isinstance(y, str) else unicode(y). for x in 'x', u'x': for y in 'y', u'y': z = re.sub(x, y, u'') self.assertEqual(z, u'') self.assertEqual(type(z), unicode) # z = re.sub(x, y, '') self.assertEqual(z, '') self.assertEqual(type(z), str) # z = re.sub(x, y, unicode(x)) self.assertEqual(z, y) self.assertEqual(type(z), unicode) # z = re.sub(x, y, str(x)) self.assertEqual(z, y) self.assertEqual(type(z), type(y)) def test_bug_1661(self): # Verify that flags do not get silently ignored with compiled patterns pattern = re.compile('.') self.assertRaises(ValueError, re.match, pattern, 'A', re.I) self.assertRaises(ValueError, re.search, pattern, 'A', re.I) self.assertRaises(ValueError, re.findall, pattern, 'A', re.I) self.assertRaises(ValueError, re.compile, pattern, re.I) def test_bug_3629(self): # A regex that triggered a bug in the sre-code validator re.compile("(?P<quote>)(?(quote))") def test_sub_template_numeric_escape(self): # bug 776311 and friends self.assertEqual(re.sub('x', r'\0', 'x'), '\0') self.assertEqual(re.sub('x', r'\000', 'x'), '\000') self.assertEqual(re.sub('x', r'\001', 'x'), '\001') self.assertEqual(re.sub('x', r'\008', 'x'), '\0' + '8') self.assertEqual(re.sub('x', r'\009', 'x'), '\0' + '9') self.assertEqual(re.sub('x', r'\111', 'x'), '\111') self.assertEqual(re.sub('x', r'\117', 'x'), '\117') self.assertEqual(re.sub('x', r'\1111', 'x'), '\1111') self.assertEqual(re.sub('x', r'\1111', 'x'), '\111' + '1') self.assertEqual(re.sub('x', r'\00', 'x'), '\x00') self.assertEqual(re.sub('x', r'\07', 'x'), '\x07') self.assertEqual(re.sub('x', r'\08', 'x'), '\0' + '8') self.assertEqual(re.sub('x', r'\09', 'x'), '\0' + '9') self.assertEqual(re.sub('x', r'\0a', 'x'), '\0' + 'a') self.assertEqual(re.sub('x', r'\400', 'x'), '\0') self.assertEqual(re.sub('x', r'\777', 'x'), '\377') self.assertRaises(re.error, re.sub, 'x', r'\1', 'x') self.assertRaises(re.error, re.sub, 'x', r'\8', 'x') self.assertRaises(re.error, re.sub, 'x', r'\9', 'x') self.assertRaises(re.error, re.sub, 'x', r'\11', 'x') self.assertRaises(re.error, re.sub, 'x', r'\18', 'x') self.assertRaises(re.error, re.sub, 'x', r'\1a', 'x') self.assertRaises(re.error, re.sub, 'x', r'\90', 'x') self.assertRaises(re.error, re.sub, 'x', r'\99', 'x') self.assertRaises(re.error, re.sub, 'x', r'\118', 'x') # r'\11' + '8' self.assertRaises(re.error, re.sub, 'x', r'\11a', 'x') self.assertRaises(re.error, re.sub, 'x', r'\181', 'x') # r'\18' + '1' self.assertRaises(re.error, re.sub, 'x', r'\800', 'x') # r'\80' + '0' # in python2.3 (etc), these loop endlessly in sre_parser.py self.assertEqual(re.sub('(((((((((((x)))))))))))', r'\11', 'x'), 'x') self.assertEqual(re.sub('((((((((((y))))))))))(.)', r'\118', 'xyz'), 'xz8') self.assertEqual(re.sub('((((((((((y))))))))))(.)', r'\11a', 'xyz'), 'xza') def test_qualified_re_sub(self): self.assertEqual(re.sub('a', 'b', 'aaaaa'), 'bbbbb') self.assertEqual(re.sub('a', 'b', 'aaaaa', 1), 'baaaa') def test_bug_114660(self): self.assertEqual(re.sub(r'(\S)\s+(\S)', r'\1 \2', 'hello there'), 'hello there') def test_bug_462270(self): # Test for empty sub() behaviour, see SF bug #462270 self.assertEqual(re.sub('x*', '-', 'abxd'), '-a-b-d-') self.assertEqual(re.sub('x+', '-', 'abxd'), 'ab-d') def test_symbolic_groups(self): re.compile('(?P<a>x)(?P=a)(?(a)y)') re.compile('(?P<a1>x)(?P=a1)(?(a1)y)') self.assertRaises(re.error, re.compile, '(?P<a>)(?P<a>)') self.assertRaises(re.error, re.compile, '(?Px)') self.assertRaises(re.error, re.compile, '(?P=)') self.assertRaises(re.error, re.compile, '(?P=1)') self.assertRaises(re.error, re.compile, '(?P=a)') self.assertRaises(re.error, re.compile, '(?P=a1)') self.assertRaises(re.error, re.compile, '(?P=a.)') self.assertRaises(re.error, re.compile, '(?P<)') self.assertRaises(re.error, re.compile, '(?P<>)') self.assertRaises(re.error, re.compile, '(?P<1>)') self.assertRaises(re.error, re.compile, '(?P<a.>)') self.assertRaises(re.error, re.compile, '(?())') self.assertRaises(re.error, re.compile, '(?(a))') self.assertRaises(re.error, re.compile, '(?(1a))') self.assertRaises(re.error, re.compile, '(?(a.))') def test_symbolic_refs(self): self.assertRaises(re.error, re.sub, '(?P<a>x)', '\g<a', 'xx') self.assertRaises(re.error, re.sub, '(?P<a>x)', '\g<', 'xx') self.assertRaises(re.error, re.sub, '(?P<a>x)', '\g', 'xx') self.assertRaises(re.error, re.sub, '(?P<a>x)', '\g<a a>', 'xx') self.assertRaises(re.error, re.sub, '(?P<a>x)', '\g<>', 'xx') self.assertRaises(re.error, re.sub, '(?P<a>x)', '\g<1a1>', 'xx') self.assertRaises(IndexError, re.sub, '(?P<a>x)', '\g<ab>', 'xx') self.assertRaises(re.error, re.sub, '(?P<a>x)|(?P<b>y)', '\g<b>', 'xx') self.assertRaises(re.error, re.sub, '(?P<a>x)|(?P<b>y)', '\\2', 'xx') self.assertRaises(re.error, re.sub, '(?P<a>x)', '\g<-1>', 'xx') def test_re_subn(self): self.assertEqual(re.subn("(?i)b+", "x", "bbbb BBBB"), ('x x', 2)) self.assertEqual(re.subn("b+", "x", "bbbb BBBB"), ('x BBBB', 1)) self.assertEqual(re.subn("b+", "x", "xyz"), ('xyz', 0)) self.assertEqual(re.subn("b*", "x", "xyz"), ('xxxyxzx', 4)) self.assertEqual(re.subn("b*", "x", "xyz", 2), ('xxxyz', 2)) def test_re_split(self): self.assertEqual(re.split(":", ":a:b::c"), ['', 'a', 'b', '', 'c']) self.assertEqual(re.split(":+", ":a:b::c"), ['', 'a', 'b', 'c']) self.assertEqual(re.split("(:+)", ":a:b::c"), ['', ':', 'a', ':', 'b', '::', 'c']) self.assertEqual(re.split("(?::+)", ":a:b::c"), ['', 'a', 'b', 'c']) self.assertEqual(re.split("(:)+", ":a:b::c"), ['', ':', 'a', ':', 'b', ':', 'c']) self.assertEqual(re.split("([b:]+)", ":a:b::c"), ['', ':', 'a', ':b::', 'c']) self.assertEqual(re.split("(b)|(:+)", ":a:b::c"), ['', None, ':', 'a', None, ':', '', 'b', None, '', None, '::', 'c']) self.assertEqual(re.split("(?:b)|(?::+)", ":a:b::c"), ['', 'a', '', '', 'c']) for sep, expected in [ (':*', ['', 'a', 'b', 'c']), ('(?::*)', ['', 'a', 'b', 'c']), ('(:*)', ['', ':', 'a', ':', 'b', '::', 'c']), ('(:)*', ['', ':', 'a', ':', 'b', ':', 'c']), ]: with check_py3k_warnings(('', FutureWarning)): self.assertEqual(re.split(sep, ':a:b::c'), expected) for sep, expected in [ ('', [':a:b::c']), (r'\b', [':a:b::c']), (r'(?=:)', [':a:b::c']), (r'(?<=:)', [':a:b::c']), ]: with check_py3k_warnings(): self.assertEqual(re.split(sep, ':a:b::c'), expected) def test_qualified_re_split(self): self.assertEqual(re.split(":", ":a:b::c", 2), ['', 'a', 'b::c']) self.assertEqual(re.split(':', 'a:b:c:d', 2), ['a', 'b', 'c:d']) self.assertEqual(re.split("(:)", ":a:b::c", 2), ['', ':', 'a', ':', 'b::c']) self.assertEqual(re.split("(:+)", ":a:b::c", 2), ['', ':', 'a', ':', 'b::c']) with check_py3k_warnings(('', FutureWarning)): self.assertEqual(re.split("(:*)", ":a:b::c", maxsplit=2), ['', ':', 'a', ':', 'b::c']) def test_re_findall(self): self.assertEqual(re.findall(":+", "abc"), []) self.assertEqual(re.findall(":+", "a:b::c:::d"), [":", "::", ":::"]) self.assertEqual(re.findall("(:+)", "a:b::c:::d"), [":", "::", ":::"]) self.assertEqual(re.findall("(:)(:*)", "a:b::c:::d"), [(":", ""), (":", ":"), (":", "::")]) def test_bug_117612(self): self.assertEqual(re.findall(r"(a|(b))", "aba"), [("a", ""),("b", "b"),("a", "")]) def test_re_match(self): self.assertEqual(re.match('a', 'a').groups(), ()) self.assertEqual(re.match('(a)', 'a').groups(), ('a',)) self.assertEqual(re.match(r'(a)', 'a').group(0), 'a') self.assertEqual(re.match(r'(a)', 'a').group(1), 'a') self.assertEqual(re.match(r'(a)', 'a').group(1, 1), ('a', 'a')) pat = re.compile('((a)|(b))(c)?') self.assertEqual(pat.match('a').groups(), ('a', 'a', None, None)) self.assertEqual(pat.match('b').groups(), ('b', None, 'b', None)) self.assertEqual(pat.match('ac').groups(), ('a', 'a', None, 'c')) self.assertEqual(pat.match('bc').groups(), ('b', None, 'b', 'c')) self.assertEqual(pat.match('bc').groups(""), ('b', "", 'b', 'c')) # A single group m = re.match('(a)', 'a') self.assertEqual(m.group(0), 'a') self.assertEqual(m.group(0), 'a') self.assertEqual(m.group(1), 'a') self.assertEqual(m.group(1, 1), ('a', 'a')) pat = re.compile('(?:(?P<a1>a)|(?P<b2>b))(?P<c3>c)?') self.assertEqual(pat.match('a').group(1, 2, 3), ('a', None, None)) self.assertEqual(pat.match('b').group('a1', 'b2', 'c3'), (None, 'b', None)) self.assertEqual(pat.match('ac').group(1, 'b2', 3), ('a', None, 'c')) def test_re_groupref_exists(self): self.assertEqual(re.match('^(\()?([^()]+)(?(1)\))$', '(a)').groups(), ('(', 'a')) self.assertEqual(re.match('^(\()?([^()]+)(?(1)\))$', 'a').groups(), (None, 'a')) self.assertIsNone(re.match('^(\()?([^()]+)(?(1)\))$', 'a)')) self.assertIsNone(re.match('^(\()?([^()]+)(?(1)\))$', '(a')) self.assertEqual(re.match('^(?:(a)|c)((?(1)b|d))$', 'ab').groups(), ('a', 'b')) self.assertEqual(re.match('^(?:(a)|c)((?(1)b|d))$', 'cd').groups(), (None, 'd')) self.assertEqual(re.match('^(?:(a)|c)((?(1)|d))$', 'cd').groups(), (None, 'd')) self.assertEqual(re.match('^(?:(a)|c)((?(1)|d))$', 'a').groups(), ('a', '')) # Tests for bug #1177831: exercise groups other than the first group p = re.compile('(?P<g1>a)(?P<g2>b)?((?(g2)c|d))') self.assertEqual(p.match('abc').groups(), ('a', 'b', 'c')) self.assertEqual(p.match('ad').groups(), ('a', None, 'd')) self.assertIsNone(p.match('abd')) self.assertIsNone(p.match('ac')) def test_re_groupref(self): self.assertEqual(re.match(r'^(\|)?([^()]+)\1$', '|a|').groups(), ('|', 'a')) self.assertEqual(re.match(r'^(\|)?([^()]+)\1?$', 'a').groups(), (None, 'a')) self.assertIsNone(re.match(r'^(\|)?([^()]+)\1$', 'a|')) self.assertIsNone(re.match(r'^(\|)?([^()]+)\1$', '|a')) self.assertEqual(re.match(r'^(?:(a)|c)(\1)$', 'aa').groups(), ('a', 'a')) self.assertEqual(re.match(r'^(?:(a)|c)(\1)?$', 'c').groups(), (None, None)) def test_groupdict(self): self.assertEqual(re.match('(?P<first>first) (?P<second>second)', 'first second').groupdict(), {'first':'first', 'second':'second'}) def test_expand(self): self.assertEqual(re.match("(?P<first>first) (?P<second>second)", "first second") .expand(r"\2 \1 \g<second> \g<first>"), "second first second first") def test_repeat_minmax(self): self.assertIsNone(re.match("^(\w){1}$", "abc")) self.assertIsNone(re.match("^(\w){1}?$", "abc")) self.assertIsNone(re.match("^(\w){1,2}$", "abc")) self.assertIsNone(re.match("^(\w){1,2}?$", "abc")) self.assertEqual(re.match("^(\w){3}$", "abc").group(1), "c") self.assertEqual(re.match("^(\w){1,3}$", "abc").group(1), "c") self.assertEqual(re.match("^(\w){1,4}$", "abc").group(1), "c") self.assertEqual(re.match("^(\w){3,4}?$", "abc").group(1), "c") self.assertEqual(re.match("^(\w){3}?$", "abc").group(1), "c") self.assertEqual(re.match("^(\w){1,3}?$", "abc").group(1), "c") self.assertEqual(re.match("^(\w){1,4}?$", "abc").group(1), "c") self.assertEqual(re.match("^(\w){3,4}?$", "abc").group(1), "c") self.assertIsNone(re.match("^x{1}$", "xxx")) self.assertIsNone(re.match("^x{1}?$", "xxx")) self.assertIsNone(re.match("^x{1,2}$", "xxx")) self.assertIsNone(re.match("^x{1,2}?$", "xxx")) self.assertTrue(re.match("^x{3}$", "xxx")) self.assertTrue(re.match("^x{1,3}$", "xxx")) self.assertTrue(re.match("^x{1,4}$", "xxx")) self.assertTrue(re.match("^x{3,4}?$", "xxx")) self.assertTrue(re.match("^x{3}?$", "xxx")) self.assertTrue(re.match("^x{1,3}?$", "xxx")) self.assertTrue(re.match("^x{1,4}?$", "xxx")) self.assertTrue(re.match("^x{3,4}?$", "xxx")) self.assertIsNone(re.match("^x{}$", "xxx")) self.assertTrue(re.match("^x{}$", "x{}")) def test_getattr(self): self.assertEqual(re.match("(a)", "a").pos, 0) self.assertEqual(re.match("(a)", "a").endpos, 1) self.assertEqual(re.match("(a)", "a").string, "a") self.assertEqual(re.match("(a)", "a").regs, ((0, 1), (0, 1))) self.assertTrue(re.match("(a)", "a").re) def test_special_escapes(self): self.assertEqual(re.search(r"\b(b.)\b", "abcd abc bcd bx").group(1), "bx") self.assertEqual(re.search(r"\B(b.)\B", "abc bcd bc abxd").group(1), "bx") self.assertEqual(re.search(r"\b(b.)\b", "abcd abc bcd bx", re.LOCALE).group(1), "bx") self.assertEqual(re.search(r"\B(b.)\B", "abc bcd bc abxd", re.LOCALE).group(1), "bx") if have_unicode: self.assertEqual(re.search(r"\b(b.)\b", "abcd abc bcd bx", re.UNICODE).group(1), "bx") self.assertEqual(re.search(r"\B(b.)\B", "abc bcd bc abxd", re.UNICODE).group(1), "bx") self.assertEqual(re.search(r"^abc$", "\nabc\n", re.M).group(0), "abc") self.assertEqual(re.search(r"^\Aabc\Z$", "abc", re.M).group(0), "abc") self.assertIsNone(re.search(r"^\Aabc\Z$", "\nabc\n", re.M)) self.assertEqual(re.search(r"\b(b.)\b", u"abcd abc bcd bx").group(1), "bx") self.assertEqual(re.search(r"\B(b.)\B", u"abc bcd bc abxd").group(1), "bx") self.assertEqual(re.search(r"^abc$", u"\nabc\n", re.M).group(0), "abc") self.assertEqual(re.search(r"^\Aabc\Z$", u"abc", re.M).group(0), "abc") self.assertIsNone(re.search(r"^\Aabc\Z$", u"\nabc\n", re.M)) self.assertEqual(re.search(r"\d\D\w\W\s\S", "1aa! a").group(0), "1aa! a") self.assertEqual(re.search(r"\d\D\w\W\s\S", "1aa! a", re.LOCALE).group(0), "1aa! a") if have_unicode: self.assertEqual(re.search(r"\d\D\w\W\s\S", "1aa! a", re.UNICODE).group(0), "1aa! a") def test_other_escapes(self): self.assertRaises(re.error, re.compile, "\\") self.assertEqual(re.match(r"\(", '(').group(), '(') self.assertIsNone(re.match(r"\(", ')')) self.assertEqual(re.match(r"\\", '\\').group(), '\\') self.assertEqual(re.match(r"[\]]", ']').group(), ']') self.assertIsNone(re.match(r"[\]]", '[')) self.assertEqual(re.match(r"[a\-c]", '-').group(), '-') self.assertIsNone(re.match(r"[a\-c]", 'b')) self.assertEqual(re.match(r"[\^a]+", 'a^').group(), 'a^') self.assertIsNone(re.match(r"[\^a]+", 'b')) re.purge() # for warnings for c in 'ceghijklmopquyzCEFGHIJKLMNOPQRTUVXY': warn = FutureWarning if c in 'Uu' else DeprecationWarning with check_py3k_warnings(('', warn)): self.assertEqual(re.match('\\%c$' % c, c).group(), c) self.assertIsNone(re.match('\\%c' % c, 'a')) for c in 'ceghijklmopquyzABCEFGHIJKLMNOPQRTUVXYZ': warn = FutureWarning if c in 'Uu' else DeprecationWarning with check_py3k_warnings(('', warn)): self.assertEqual(re.match('[\\%c]$' % c, c).group(), c) self.assertIsNone(re.match('[\\%c]' % c, 'a')) def test_string_boundaries(self): # See http://bugs.python.org/issue10713 self.assertEqual(re.search(r"\b(abc)\b", "abc").group(1), "abc") # There's a word boundary at the start of a string. self.assertTrue(re.match(r"\b", "abc")) # A non-empty string includes a non-boundary zero-length match. self.assertTrue(re.search(r"\B", "abc")) # There is no non-boundary match at the start of a string. self.assertFalse(re.match(r"\B", "abc")) # However, an empty string contains no word boundaries, and also no # non-boundaries. self.assertIsNone(re.search(r"\B", "")) # This one is questionable and different from the perlre behaviour, # but describes current behavior. self.assertIsNone(re.search(r"\b", "")) # A single word-character string has two boundaries, but no # non-boundary gaps. self.assertEqual(len(re.findall(r"\b", "a")), 2) self.assertEqual(len(re.findall(r"\B", "a")), 0) # If there are no words, there are no boundaries self.assertEqual(len(re.findall(r"\b", " ")), 0) self.assertEqual(len(re.findall(r"\b", " ")), 0) # Can match around the whitespace. self.assertEqual(len(re.findall(r"\B", " ")), 2) @requires_unicode def test_bigcharset(self): self.assertEqual(re.match(u(r"([\u2222\u2223])"), unichr(0x2222)).group(1), unichr(0x2222)) self.assertEqual(re.match(u(r"([\u2222\u2223])"), unichr(0x2222), re.UNICODE).group(1), unichr(0x2222)) r = u'[%s]' % u''.join(map(unichr, range(256, 2**16, 255))) self.assertEqual(re.match(r, unichr(0xff01), re.UNICODE).group(), unichr(0xff01)) def test_big_codesize(self): # Issue #1160 r = re.compile('|'.join(('%d'%x for x in range(10000)))) self.assertTrue(r.match('1000')) self.assertTrue(r.match('9999')) def test_anyall(self): self.assertEqual(re.match("a.b", "a\nb", re.DOTALL).group(0), "a\nb") self.assertEqual(re.match("a.*b", "a\n\nb", re.DOTALL).group(0), "a\n\nb") def test_lookahead(self): self.assertEqual(re.match("(a(?=\s[^a]))", "a b").group(1), "a") self.assertEqual(re.match("(a(?=\s[^a]*))", "a b").group(1), "a") self.assertEqual(re.match("(a(?=\s[abc]))", "a b").group(1), "a") self.assertEqual(re.match("(a(?=\s[abc]*))", "a bc").group(1), "a") self.assertEqual(re.match(r"(a)(?=\s\1)", "a a").group(1), "a") self.assertEqual(re.match(r"(a)(?=\s\1*)", "a aa").group(1), "a") self.assertEqual(re.match(r"(a)(?=\s(abc|a))", "a a").group(1), "a") self.assertEqual(re.match(r"(a(?!\s[^a]))", "a a").group(1), "a") self.assertEqual(re.match(r"(a(?!\s[abc]))", "a d").group(1), "a") self.assertEqual(re.match(r"(a)(?!\s\1)", "a b").group(1), "a") self.assertEqual(re.match(r"(a)(?!\s(abc|a))", "a b").group(1), "a") # Group reference. self.assertTrue(re.match(r'(a)b(?=\1)a', 'aba')) self.assertIsNone(re.match(r'(a)b(?=\1)c', 'abac')) # Named group reference. self.assertTrue(re.match(r'(?P<g>a)b(?=(?P=g))a', 'aba')) self.assertIsNone(re.match(r'(?P<g>a)b(?=(?P=g))c', 'abac')) # Conditional group reference. self.assertTrue(re.match(r'(?:(a)|(x))b(?=(?(2)x|c))c', 'abc')) self.assertIsNone(re.match(r'(?:(a)|(x))b(?=(?(2)c|x))c', 'abc')) self.assertTrue(re.match(r'(?:(a)|(x))b(?=(?(2)x|c))c', 'abc')) self.assertIsNone(re.match(r'(?:(a)|(x))b(?=(?(1)b|x))c', 'abc')) self.assertTrue(re.match(r'(?:(a)|(x))b(?=(?(1)c|x))c', 'abc')) # Group used before defined. self.assertTrue(re.match(r'(a)b(?=(?(2)x|c))(c)', 'abc')) self.assertIsNone(re.match(r'(a)b(?=(?(2)b|x))(c)', 'abc')) self.assertTrue(re.match(r'(a)b(?=(?(1)c|x))(c)', 'abc')) def test_lookbehind(self): self.assertTrue(re.match(r'ab(?<=b)c', 'abc')) self.assertIsNone(re.match(r'ab(?<=c)c', 'abc')) self.assertIsNone(re.match(r'ab(?<!b)c', 'abc')) self.assertTrue(re.match(r'ab(?<!c)c', 'abc')) # Group reference. with check_warnings(('', RuntimeWarning)): re.compile(r'(a)a(?<=\1)c') # Named group reference. with check_warnings(('', RuntimeWarning)): re.compile(r'(?P<g>a)a(?<=(?P=g))c') # Conditional group reference. with check_warnings(('', RuntimeWarning)): re.compile(r'(a)b(?<=(?(1)b|x))c') # Group used before defined. with check_warnings(('', RuntimeWarning)): re.compile(r'(a)b(?<=(?(2)b|x))(c)') def test_ignore_case(self): self.assertEqual(re.match("abc", "ABC", re.I).group(0), "ABC") self.assertEqual(re.match("abc", u"ABC", re.I).group(0), "ABC") self.assertEqual(re.match(r"(a\s[^a])", "a b", re.I).group(1), "a b") self.assertEqual(re.match(r"(a\s[^a]*)", "a bb", re.I).group(1), "a bb") self.assertEqual(re.match(r"(a\s[abc])", "a b", re.I).group(1), "a b") self.assertEqual(re.match(r"(a\s[abc]*)", "a bb", re.I).group(1), "a bb") self.assertEqual(re.match(r"((a)\s\2)", "a a", re.I).group(1), "a a") self.assertEqual(re.match(r"((a)\s\2*)", "a aa", re.I).group(1), "a aa") self.assertEqual(re.match(r"((a)\s(abc|a))", "a a", re.I).group(1), "a a") self.assertEqual(re.match(r"((a)\s(abc|a)*)", "a aa", re.I).group(1), "a aa") if have_unicode: assert u(r'\u212a').lower() == u'k' # 'K' self.assertTrue(re.match(ur'K', u(r'\u212a'), re.U | re.I)) self.assertTrue(re.match(ur'k', u(r'\u212a'), re.U | re.I)) self.assertTrue(re.match(u(r'\u212a'), u'K', re.U | re.I)) self.assertTrue(re.match(u(r'\u212a'), u'k', re.U | re.I)) assert u(r'\u017f').upper() == u'S' # 'ſ' self.assertTrue(re.match(ur'S', u(r'\u017f'), re.U | re.I)) self.assertTrue(re.match(ur's', u(r'\u017f'), re.U | re.I)) self.assertTrue(re.match(u(r'\u017f'), u'S', re.U | re.I)) self.assertTrue(re.match(u(r'\u017f'), u's', re.U | re.I)) def test_ignore_case_set(self): self.assertTrue(re.match(r'[19A]', 'A', re.I)) self.assertTrue(re.match(r'[19a]', 'a', re.I)) self.assertTrue(re.match(r'[19a]', 'A', re.I)) self.assertTrue(re.match(r'[19A]', 'a', re.I)) if have_unicode: self.assertTrue(re.match(ur'[19A]', u'A', re.U | re.I)) self.assertTrue(re.match(ur'[19a]', u'a', re.U | re.I)) self.assertTrue(re.match(ur'[19a]', u'A', re.U | re.I)) self.assertTrue(re.match(ur'[19A]', u'a', re.U | re.I)) assert u(r'\u212a').lower() == u'k' # 'K' self.assertTrue(re.match(u(r'[19K]'), u(r'\u212a'), re.U | re.I)) self.assertTrue(re.match(u(r'[19k]'), u(r'\u212a'), re.U | re.I)) self.assertTrue(re.match(u(r'[19\u212a]'), u'K', re.U | re.I)) self.assertTrue(re.match(u(r'[19\u212a]'), u'k', re.U | re.I)) assert u(r'\u017f').upper() == u'S' # 'ſ' self.assertTrue(re.match(ur'[19S]', u(r'\u017f'), re.U | re.I)) self.assertTrue(re.match(ur'[19s]', u(r'\u017f'), re.U | re.I)) self.assertTrue(re.match(u(r'[19\u017f]'), u'S', re.U | re.I)) self.assertTrue(re.match(u(r'[19\u017f]'), u's', re.U | re.I)) def test_ignore_case_range(self): # Issues #3511, #17381. self.assertTrue(re.match(r'[9-a]', '_', re.I)) self.assertIsNone(re.match(r'[9-A]', '_', re.I)) self.assertTrue(re.match(r'[\xc0-\xde]', '\xd7', re.I)) self.assertIsNone(re.match(r'[\xc0-\xde]', '\xf7', re.I)) self.assertTrue(re.match(r'[\xe0-\xfe]', '\xf7',re.I)) self.assertIsNone(re.match(r'[\xe0-\xfe]', '\xd7', re.I)) if have_unicode: self.assertTrue(re.match(u(r'[9-a]'), u(r'_'), re.U | re.I)) self.assertIsNone(re.match(u(r'[9-A]'), u(r'_'), re.U | re.I)) self.assertTrue(re.match(u(r'[\xc0-\xde]'), u(r'\xd7'), re.U | re.I)) self.assertIsNone(re.match(u(r'[\xc0-\xde]'), u(r'\xf7'), re.U | re.I)) self.assertTrue(re.match(u(r'[\xe0-\xfe]'), u(r'\xf7'), re.U | re.I)) self.assertIsNone(re.match(u(r'[\xe0-\xfe]'), u(r'\xd7'), re.U | re.I)) self.assertTrue(re.match(u(r'[\u0430-\u045f]'), u(r'\u0450'), re.U | re.I)) self.assertTrue(re.match(u(r'[\u0430-\u045f]'), u(r'\u0400'), re.U | re.I)) self.assertTrue(re.match(u(r'[\u0400-\u042f]'), u(r'\u0450'), re.U | re.I)) self.assertTrue(re.match(u(r'[\u0400-\u042f]'), u(r'\u0400'), re.U | re.I)) if sys.maxunicode > 0xffff: self.assertTrue(re.match(u(r'[\U00010428-\U0001044f]'), u(r'\U00010428'), re.U | re.I)) self.assertTrue(re.match(u(r'[\U00010428-\U0001044f]'), u(r'\U00010400'), re.U | re.I)) self.assertTrue(re.match(u(r'[\U00010400-\U00010427]'), u(r'\U00010428'), re.U | re.I)) self.assertTrue(re.match(u(r'[\U00010400-\U00010427]'), u(r'\U00010400'), re.U | re.I)) assert u(r'\u212a').lower() == u'k' # 'K' self.assertTrue(re.match(ur'[J-M]', u(r'\u212a'), re.U | re.I)) self.assertTrue(re.match(ur'[j-m]', u(r'\u212a'), re.U | re.I)) self.assertTrue(re.match(u(r'[\u2129-\u212b]'), u'K', re.U | re.I)) self.assertTrue(re.match(u(r'[\u2129-\u212b]'), u'k', re.U | re.I)) assert u(r'\u017f').upper() == u'S' # 'ſ' self.assertTrue(re.match(ur'[R-T]', u(r'\u017f'), re.U | re.I)) self.assertTrue(re.match(ur'[r-t]', u(r'\u017f'), re.U | re.I)) self.assertTrue(re.match(u(r'[\u017e-\u0180]'), u'S', re.U | re.I)) self.assertTrue(re.match(u(r'[\u017e-\u0180]'), u's', re.U | re.I)) def test_category(self): self.assertEqual(re.match(r"(\s)", " ").group(1), " ") def test_getlower(self): import _sre self.assertEqual(_sre.getlower(ord('A'), 0), ord('a')) self.assertEqual(_sre.getlower(ord('A'), re.LOCALE), ord('a')) if have_unicode: self.assertEqual(_sre.getlower(ord('A'), re.UNICODE), ord('a')) self.assertEqual(re.match("abc", "ABC", re.I).group(0), "ABC") self.assertEqual(re.match("abc", u"ABC", re.I).group(0), "ABC") def test_not_literal(self): self.assertEqual(re.search("\s([^a])", " b").group(1), "b") self.assertEqual(re.search("\s([^a]*)", " bb").group(1), "bb") def test_search_coverage(self): self.assertEqual(re.search("\s(b)", " b").group(1), "b") self.assertEqual(re.search("a\s", "a ").group(0), "a ") def assertMatch(self, pattern, text, match=None, span=None, matcher=re.match): if match is None and span is None: # the pattern matches the whole text match = text span = (0, len(text)) elif match is None or span is None: raise ValueError('If match is not None, span should be specified ' '(and vice versa).') m = matcher(pattern, text) self.assertTrue(m) self.assertEqual(m.group(), match) self.assertEqual(m.span(), span) @requires_unicode def test_re_escape(self): alnum_chars = unicode(string.ascii_letters + string.digits) p = u''.join(unichr(i) for i in range(256)) for c in p: if c in alnum_chars: self.assertEqual(re.escape(c), c) elif c == u'\x00': self.assertEqual(re.escape(c), u'\\000') else: self.assertEqual(re.escape(c), u'\\' + c) self.assertMatch(re.escape(c), c) self.assertMatch(re.escape(p), p) def test_re_escape_byte(self): alnum_chars = string.ascii_letters + string.digits p = ''.join(chr(i) for i in range(256)) for b in p: if b in alnum_chars: self.assertEqual(re.escape(b), b) elif b == b'\x00': self.assertEqual(re.escape(b), b'\\000') else: self.assertEqual(re.escape(b), b'\\' + b) self.assertMatch(re.escape(b), b) self.assertMatch(re.escape(p), p) @requires_unicode def test_re_escape_non_ascii(self): s = u(r'xxx\u2620\u2620\u2620xxx') s_escaped = re.escape(s) self.assertEqual(s_escaped, u(r'xxx\\\u2620\\\u2620\\\u2620xxx')) self.assertMatch(s_escaped, s) self.assertMatch(u'.%s+.' % re.escape(unichr(0x2620)), s, u(r'x\u2620\u2620\u2620x'), (2, 7), re.search) def test_re_escape_non_ascii_bytes(self): b = b'y\xe2\x98\xa0y\xe2\x98\xa0y' b_escaped = re.escape(b) self.assertEqual(b_escaped, b'y\\\xe2\\\x98\\\xa0y\\\xe2\\\x98\\\xa0y') self.assertMatch(b_escaped, b) res = re.findall(re.escape(b'\xe2\x98\xa0'), b) self.assertEqual(len(res), 2) def test_pickling(self): import pickle self.pickle_test(pickle) import cPickle self.pickle_test(cPickle) # old pickles expect the _compile() reconstructor in sre module import_module("sre", deprecated=True) from sre import _compile # current pickle expects the _compile() reconstructor in re module from re import _compile def pickle_test(self, pickle): oldpat = re.compile('a(?:b|(c|e){1,2}?|d)+?(.)') for proto in range(pickle.HIGHEST_PROTOCOL + 1): pickled = pickle.dumps(oldpat, proto) newpat = pickle.loads(pickled) self.assertEqual(newpat, oldpat) def test_constants(self): self.assertEqual(re.I, re.IGNORECASE) self.assertEqual(re.L, re.LOCALE) self.assertEqual(re.M, re.MULTILINE) self.assertEqual(re.S, re.DOTALL) self.assertEqual(re.X, re.VERBOSE) def test_flags(self): for flag in [re.I, re.M, re.X, re.S, re.L]: self.assertTrue(re.compile('^pattern$', flag)) def test_sre_character_literals(self): for i in [0, 8, 16, 32, 64, 127, 128, 255]: self.assertTrue(re.match(r"\%03o" % i, chr(i))) self.assertTrue(re.match(r"\%03o0" % i, chr(i)+"0")) self.assertTrue(re.match(r"\%03o8" % i, chr(i)+"8")) self.assertTrue(re.match(r"\x%02x" % i, chr(i))) self.assertTrue(re.match(r"\x%02x0" % i, chr(i)+"0")) self.assertTrue(re.match(r"\x%02xz" % i, chr(i)+"z")) self.assertRaises(re.error, re.match, "\911", "") def test_sre_character_class_literals(self): for i in [0, 8, 16, 32, 64, 127, 128, 255]: self.assertTrue(re.match(r"[\%03o]" % i, chr(i))) self.assertTrue(re.match(r"[\%03o0]" % i, chr(i))) self.assertTrue(re.match(r"[\%03o8]" % i, chr(i))) self.assertTrue(re.match(r"[\x%02x]" % i, chr(i))) self.assertTrue(re.match(r"[\x%02x0]" % i, chr(i))) self.assertTrue(re.match(r"[\x%02xz]" % i, chr(i))) self.assertRaises(re.error, re.match, "[\911]", "") def test_bug_113254(self): self.assertEqual(re.match(r'(a)|(b)', 'b').start(1), -1) self.assertEqual(re.match(r'(a)|(b)', 'b').end(1), -1) self.assertEqual(re.match(r'(a)|(b)', 'b').span(1), (-1, -1)) def test_bug_527371(self): # bug described in patches 527371/672491 self.assertIsNone(re.match(r'(a)?a','a').lastindex) self.assertEqual(re.match(r'(a)(b)?b','ab').lastindex, 1) self.assertEqual(re.match(r'(?P<a>a)(?P<b>b)?b','ab').lastgroup, 'a') self.assertEqual(re.match("(?P<a>a(b))", "ab").lastgroup, 'a') self.assertEqual(re.match("((a))", "a").lastindex, 1) def test_bug_545855(self): # bug 545855 -- This pattern failed to cause a compile error as it # should, instead provoking a TypeError. self.assertRaises(re.error, re.compile, 'foo[a-') def test_bug_418626(self): # bugs 418626 at al. -- Testing Greg Chapman's addition of op code # SRE_OP_MIN_REPEAT_ONE for eliminating recursion on simple uses of # pattern '*?' on a long string. self.assertEqual(re.match('.*?c', 10000*'ab'+'cd').end(0), 20001) self.assertEqual(re.match('.*?cd', 5000*'ab'+'c'+5000*'ab'+'cde').end(0), 20003) self.assertEqual(re.match('.*?cd', 20000*'abc'+'de').end(0), 60001) # non-simple '*?' still used to hit the recursion limit, before the # non-recursive scheme was implemented. self.assertEqual(re.search('(a|b)*?c', 10000*'ab'+'cd').end(0), 20001) @requires_unicode def test_bug_612074(self): pat=u"["+re.escape(unichr(0x2039))+u"]" self.assertEqual(re.compile(pat) and 1, 1) def test_stack_overflow(self): # nasty cases that used to overflow the straightforward recursive # implementation of repeated groups. self.assertEqual(re.match('(x)*', 50000*'x').group(1), 'x') self.assertEqual(re.match('(x)*y', 50000*'x'+'y').group(1), 'x') self.assertEqual(re.match('(x)*?y', 50000*'x'+'y').group(1), 'x') def test_unlimited_zero_width_repeat(self): # Issue #9669 self.assertIsNone(re.match(r'(?:a?)*y', 'z')) self.assertIsNone(re.match(r'(?:a?)+y', 'z')) self.assertIsNone(re.match(r'(?:a?){2,}y', 'z')) self.assertIsNone(re.match(r'(?:a?)*?y', 'z')) self.assertIsNone(re.match(r'(?:a?)+?y', 'z')) self.assertIsNone(re.match(r'(?:a?){2,}?y', 'z')) def test_scanner(self): def s_ident(scanner, token): return token def s_operator(scanner, token): return "op%s" % token def s_float(scanner, token): return float(token) def s_int(scanner, token): return int(token) scanner = Scanner([ (r"[a-zA-Z_]\w*", s_ident), (r"\d+\.\d*", s_float), (r"\d+", s_int), (r"=|\+|-|\*|/", s_operator), (r"\s+", None), ]) self.assertTrue(scanner.scanner.scanner("").pattern) self.assertEqual(scanner.scan("sum = 3*foo + 312.50 + bar"), (['sum', 'op=', 3, 'op*', 'foo', 'op+', 312.5, 'op+', 'bar'], '')) def test_bug_448951(self): # bug 448951 (similar to 429357, but with single char match) # (Also test greedy matches.) for op in '','?','*': self.assertEqual(re.match(r'((.%s):)?z'%op, 'z').groups(), (None, None)) self.assertEqual(re.match(r'((.%s):)?z'%op, 'a:z').groups(), ('a:', 'a')) def test_bug_725106(self): # capturing groups in alternatives in repeats self.assertEqual(re.match('^((a)|b)*', 'abc').groups(), ('b', 'a')) self.assertEqual(re.match('^(([ab])|c)*', 'abc').groups(), ('c', 'b')) self.assertEqual(re.match('^((d)|[ab])*', 'abc').groups(), ('b', None)) self.assertEqual(re.match('^((a)c|[ab])*', 'abc').groups(), ('b', None)) self.assertEqual(re.match('^((a)|b)*?c', 'abc').groups(), ('b', 'a')) self.assertEqual(re.match('^(([ab])|c)*?d', 'abcd').groups(), ('c', 'b')) self.assertEqual(re.match('^((d)|[ab])*?c', 'abc').groups(), ('b', None)) self.assertEqual(re.match('^((a)c|[ab])*?c', 'abc').groups(), ('b', None)) def test_bug_725149(self): # mark_stack_base restoring before restoring marks self.assertEqual(re.match('(a)(?:(?=(b)*)c)*', 'abb').groups(), ('a', None)) self.assertEqual(re.match('(a)((?!(b)*))*', 'abb').groups(), ('a', None, None)) @requires_unicode def test_bug_764548(self): # bug 764548, re.compile() barfs on str/unicode subclasses class my_unicode(unicode): pass pat = re.compile(my_unicode("abc")) self.assertIsNone(pat.match("xyz")) def test_finditer(self): iter = re.finditer(r":+", "a:b::c:::d") self.assertEqual([item.group(0) for item in iter], [":", "::", ":::"]) @requires_unicode def test_bug_926075(self): self.assertIsNot(re.compile('bug_926075'), re.compile(u'bug_926075')) @requires_unicode def test_bug_931848(self): pattern = u(r"[\u002E\u3002\uFF0E\uFF61]") self.assertEqual(re.compile(pattern).split("a.b.c"), ['a','b','c']) def test_bug_581080(self): iter = re.finditer(r"\s", "a b") self.assertEqual(iter.next().span(), (1,2)) self.assertRaises(StopIteration, iter.next) scanner = re.compile(r"\s").scanner("a b") self.assertEqual(scanner.search().span(), (1, 2)) self.assertIsNone(scanner.search()) def test_bug_817234(self): iter = re.finditer(r".*", "asdf") self.assertEqual(iter.next().span(), (0, 4)) self.assertEqual(iter.next().span(), (4, 4)) self.assertRaises(StopIteration, iter.next) @requires_unicode def test_bug_6561(self): # '\d' should match characters in Unicode category 'Nd' # (Number, Decimal Digit), but not those in 'Nl' (Number, # Letter) or 'No' (Number, Other). decimal_digits = [ unichr(0x0037), # '\N{DIGIT SEVEN}', category 'Nd' unichr(0x0e58), # '\N{THAI DIGIT SIX}', category 'Nd' unichr(0xff10), # '\N{FULLWIDTH DIGIT ZERO}', category 'Nd' ] for x in decimal_digits: self.assertEqual(re.match('^\d$', x, re.UNICODE).group(0), x) not_decimal_digits = [ unichr(0x2165), # '\N{ROMAN NUMERAL SIX}', category 'Nl' unichr(0x3039), # '\N{HANGZHOU NUMERAL TWENTY}', category 'Nl' unichr(0x2082), # '\N{SUBSCRIPT TWO}', category 'No' unichr(0x32b4), # '\N{CIRCLED NUMBER THIRTY NINE}', category 'No' ] for x in not_decimal_digits: self.assertIsNone(re.match('^\d$', x, re.UNICODE)) def test_empty_array(self): # SF buf 1647541 import array typecodes = 'cbBhHiIlLfd' if have_unicode: typecodes += 'u' for typecode in typecodes: a = array.array(typecode) self.assertIsNone(re.compile("bla").match(a)) self.assertEqual(re.compile("").match(a).groups(), ()) @requires_unicode def test_inline_flags(self): # Bug #1700 upper_char = unichr(0x1ea0) # Latin Capital Letter A with Dot Bellow lower_char = unichr(0x1ea1) # Latin Small Letter A with Dot Bellow p = re.compile(upper_char, re.I | re.U) q = p.match(lower_char) self.assertTrue(q) p = re.compile(lower_char, re.I | re.U) q = p.match(upper_char) self.assertTrue(q) p = re.compile('(?i)' + upper_char, re.U) q = p.match(lower_char) self.assertTrue(q) p = re.compile('(?i)' + lower_char, re.U) q = p.match(upper_char) self.assertTrue(q) p = re.compile('(?iu)' + upper_char) q = p.match(lower_char) self.assertTrue(q) p = re.compile('(?iu)' + lower_char) q = p.match(upper_char) self.assertTrue(q) self.assertTrue(re.match('(?ixu) ' + upper_char, lower_char)) self.assertTrue(re.match('(?ixu) ' + lower_char, upper_char)) # Incompatibilities re.purge() with check_py3k_warnings(): re.compile('', re.LOCALE|re.UNICODE) with check_py3k_warnings(): re.compile('(?L)', re.UNICODE) with check_py3k_warnings(): re.compile('(?u)', re.LOCALE) with check_py3k_warnings(): re.compile('(?Lu)') with check_py3k_warnings(): re.compile('(?uL)') def test_dollar_matches_twice(self): "$ matches the end of string, and just before the terminating \n" pattern = re.compile('$') self.assertEqual(pattern.sub('#', 'a\nb\n'), 'a\nb#\n#') self.assertEqual(pattern.sub('#', 'a\nb\nc'), 'a\nb\nc#') self.assertEqual(pattern.sub('#', '\n'), '#\n#') pattern = re.compile('$', re.MULTILINE) self.assertEqual(pattern.sub('#', 'a\nb\n' ), 'a#\nb#\n#' ) self.assertEqual(pattern.sub('#', 'a\nb\nc'), 'a#\nb#\nc#') self.assertEqual(pattern.sub('#', '\n'), '#\n#') def test_dealloc(self): # issue 3299: check for segfault in debug build import _sre # the overflow limit is different on wide and narrow builds and it # depends on the definition of SRE_CODE (see sre.h). # 2**128 should be big enough to overflow on both. For smaller values # a RuntimeError is raised instead of OverflowError. long_overflow = 2**128 self.assertRaises(TypeError, re.finditer, "a", {}) self.assertRaises(OverflowError, _sre.compile, "abc", 0, [long_overflow]) def test_compile(self): # Test return value when given string and pattern as parameter pattern = re.compile('random pattern') self.assertIsInstance(pattern, re._pattern_type) same_pattern = re.compile(pattern) self.assertIsInstance(same_pattern, re._pattern_type) self.assertIs(same_pattern, pattern) # Test behaviour when not given a string or pattern as parameter self.assertRaises(TypeError, re.compile, 0) def test_bug_13899(self): # Issue #13899: re pattern r"[\A]" should work like "A" but matches # nothing. Ditto B and Z. with check_py3k_warnings(): self.assertEqual(re.findall(r'[\A\B\b\C\Z]', 'AB\bCZ'), ['A', 'B', '\b', 'C', 'Z']) @precisionbigmemtest(size=_2G, memuse=1) def test_large_search(self, size): # Issue #10182: indices were 32-bit-truncated. s = 'a' * size m = re.search('$', s) self.assertIsNotNone(m) self.assertEqual(m.start(), size) self.assertEqual(m.end(), size) # The huge memuse is because of re.sub() using a list and a join() # to create the replacement result. @precisionbigmemtest(size=_2G, memuse=16 + 2) def test_large_subn(self, size): # Issue #10182: indices were 32-bit-truncated. s = 'a' * size r, n = re.subn('', '', s) self.assertEqual(r, s) self.assertEqual(n, size + 1) def test_repeat_minmax_overflow(self): # Issue #13169 string = "x" * 100000 self.assertEqual(re.match(r".{65535}", string).span(), (0, 65535)) self.assertEqual(re.match(r".{,65535}", string).span(), (0, 65535)) self.assertEqual(re.match(r".{65535,}?", string).span(), (0, 65535)) self.assertEqual(re.match(r".{65536}", string).span(), (0, 65536)) self.assertEqual(re.match(r".{,65536}", string).span(), (0, 65536)) self.assertEqual(re.match(r".{65536,}?", string).span(), (0, 65536)) # 2**128 should be big enough to overflow both SRE_CODE and Py_ssize_t. self.assertRaises(OverflowError, re.compile, r".{%d}" % 2**128) self.assertRaises(OverflowError, re.compile, r".{,%d}" % 2**128) self.assertRaises(OverflowError, re.compile, r".{%d,}?" % 2**128) self.assertRaises(OverflowError, re.compile, r".{%d,%d}" % (2**129, 2**128)) @cpython_only def test_repeat_minmax_overflow_maxrepeat(self): try: from _sre import MAXREPEAT except ImportError: self.skipTest('requires _sre.MAXREPEAT constant') string = "x" * 100000 self.assertIsNone(re.match(r".{%d}" % (MAXREPEAT - 1), string)) self.assertEqual(re.match(r".{,%d}" % (MAXREPEAT - 1), string).span(), (0, 100000)) self.assertIsNone(re.match(r".{%d,}?" % (MAXREPEAT - 1), string)) self.assertRaises(OverflowError, re.compile, r".{%d}" % MAXREPEAT) self.assertRaises(OverflowError, re.compile, r".{,%d}" % MAXREPEAT) self.assertRaises(OverflowError, re.compile, r".{%d,}?" % MAXREPEAT) def test_backref_group_name_in_exception(self): # Issue 17341: Poor error message when compiling invalid regex with self.assertRaisesRegexp(sre_constants.error, '<foo>'): re.compile('(?P=<foo>)') def test_group_name_in_exception(self): # Issue 17341: Poor error message when compiling invalid regex with self.assertRaisesRegexp(sre_constants.error, '\?foo'): re.compile('(?P<?foo>)') def test_issue17998(self): for reps in '*', '+', '?', '{1}': for mod in '', '?': pattern = '.' + reps + mod + 'yz' self.assertEqual(re.compile(pattern, re.S).findall('xyz'), ['xyz'], msg=pattern) if have_unicode: pattern = unicode(pattern) self.assertEqual(re.compile(pattern, re.S).findall(u'xyz'), [u'xyz'], msg=pattern) def test_bug_2537(self): # issue 2537: empty submatches for outer_op in ('{0,}', '*', '+', '{1,187}'): for inner_op in ('{0,}', '*', '?'): r = re.compile("^((x|y)%s)%s" % (inner_op, outer_op)) m = r.match("xyyzy") self.assertEqual(m.group(0), "xyy") self.assertEqual(m.group(1), "") self.assertEqual(m.group(2), "y") def test_debug_flag(self): pat = r'(\.)(?:[ch]|py)(?(1)$|: )' with captured_stdout() as out: re.compile(pat, re.DEBUG) dump = '''\ subpattern 1 literal 46 subpattern None branch in literal 99 literal 104 or literal 112 literal 121 subpattern None groupref_exists 1 at at_end else literal 58 literal 32 ''' self.assertEqual(out.getvalue(), dump) # Debug output is output again even a second time (bypassing # the cache -- issue #20426). with captured_stdout() as out: re.compile(pat, re.DEBUG) self.assertEqual(out.getvalue(), dump) def test_keyword_parameters(self): # Issue #20283: Accepting the string keyword parameter. pat = re.compile(r'(ab)') self.assertEqual( pat.match(string='abracadabra', pos=7, endpos=10).span(), (7, 9)) self.assertEqual( pat.search(string='abracadabra', pos=3, endpos=10).span(), (7, 9)) self.assertEqual( pat.findall(string='abracadabra', pos=3, endpos=10), ['ab']) self.assertEqual( pat.split(string='abracadabra', maxsplit=1), ['', 'ab', 'racadabra']) def test_match_group_takes_long(self): self.assertEqual(re.match("(foo)", "foo").group(1L), "foo") self.assertRaises(IndexError, re.match("", "").group, sys.maxint + 1) def test_locale_caching(self): # Issue #22410 oldlocale = locale.setlocale(locale.LC_CTYPE) self.addCleanup(locale.setlocale, locale.LC_CTYPE, oldlocale) for loc in 'en_US.iso88591', 'en_US.utf8': try: locale.setlocale(locale.LC_CTYPE, loc) except locale.Error: # Unsupported locale on this system self.skipTest('test needs %s locale' % loc) re.purge() self.check_en_US_iso88591() self.check_en_US_utf8() re.purge() self.check_en_US_utf8() self.check_en_US_iso88591() def check_en_US_iso88591(self): locale.setlocale(locale.LC_CTYPE, 'en_US.iso88591') self.assertTrue(re.match(b'\xc5\xe5', b'\xc5\xe5', re.L|re.I)) self.assertTrue(re.match(b'\xc5', b'\xe5', re.L|re.I)) self.assertTrue(re.match(b'\xe5', b'\xc5', re.L|re.I)) self.assertTrue(re.match(b'(?Li)\xc5\xe5', b'\xc5\xe5')) self.assertTrue(re.match(b'(?Li)\xc5', b'\xe5')) self.assertTrue(re.match(b'(?Li)\xe5', b'\xc5')) def check_en_US_utf8(self): locale.setlocale(locale.LC_CTYPE, 'en_US.utf8') self.assertTrue(re.match(b'\xc5\xe5', b'\xc5\xe5', re.L|re.I)) self.assertIsNone(re.match(b'\xc5', b'\xe5', re.L|re.I)) self.assertIsNone(re.match(b'\xe5', b'\xc5', re.L|re.I)) self.assertTrue(re.match(b'(?Li)\xc5\xe5', b'\xc5\xe5')) self.assertIsNone(re.match(b'(?Li)\xc5', b'\xe5')) self.assertIsNone(re.match(b'(?Li)\xe5', b'\xc5')) def run_re_tests(): from test.re_tests import tests, SUCCEED, FAIL, SYNTAX_ERROR if verbose: print 'Running re_tests test suite' else: # To save time, only run the first and last 10 tests #tests = tests[:10] + tests[-10:] pass for t in tests: sys.stdout.flush() pattern = s = outcome = repl = expected = None if len(t) == 5: pattern, s, outcome, repl, expected = t elif len(t) == 3: pattern, s, outcome = t else: raise ValueError, ('Test tuples should have 3 or 5 fields', t) try: obj = re.compile(pattern) except re.error: if outcome == SYNTAX_ERROR: pass # Expected a syntax error else: print '=== Syntax error:', t except KeyboardInterrupt: raise KeyboardInterrupt except: print '*** Unexpected error ***', t if verbose: traceback.print_exc(file=sys.stdout) else: try: result = obj.search(s) except re.error, msg: print '=== Unexpected exception', t, repr(msg) if outcome == SYNTAX_ERROR: # This should have been a syntax error; forget it. pass elif outcome == FAIL: if result is None: pass # No match, as expected else: print '=== Succeeded incorrectly', t elif outcome == SUCCEED: if result is not None: # Matched, as expected, so now we compute the # result string and compare it to our expected result. start, end = result.span(0) vardict={'found': result.group(0), 'groups': result.group(), 'flags': result.re.flags} for i in range(1, 100): try: gi = result.group(i) # Special hack because else the string concat fails: if gi is None: gi = "None" except IndexError: gi = "Error" vardict['g%d' % i] = gi for i in result.re.groupindex.keys(): try: gi = result.group(i) if gi is None: gi = "None" except IndexError: gi = "Error" vardict[i] = gi repl = eval(repl, vardict) if repl != expected: print '=== grouping error', t, print repr(repl) + ' should be ' + repr(expected) else: print '=== Failed incorrectly', t # Try the match on a unicode string, and check that it # still succeeds. try: result = obj.search(unicode(s, "latin-1")) if result is None: print '=== Fails on unicode match', t except NameError: continue # 1.5.2 except TypeError: continue # unicode test case # Try the match on a unicode pattern, and check that it # still succeeds. obj=re.compile(unicode(pattern, "latin-1")) result = obj.search(s) if result is None: print '=== Fails on unicode pattern match', t # Try the match with the search area limited to the extent # of the match and see if it still succeeds. \B will # break (because it won't match at the end or start of a # string), so we'll ignore patterns that feature it. if pattern[:2] != '\\B' and pattern[-2:] != '\\B' \ and result is not None: obj = re.compile(pattern) result = obj.search(s, result.start(0), result.end(0) + 1) if result is None: print '=== Failed on range-limited match', t # Try the match with IGNORECASE enabled, and check that it # still succeeds. obj = re.compile(pattern, re.IGNORECASE) result = obj.search(s) if result is None: print '=== Fails on case-insensitive match', t # Try the match with LOCALE enabled, and check that it # still succeeds. obj = re.compile(pattern, re.LOCALE) result = obj.search(s) if result is None: print '=== Fails on locale-sensitive match', t # Try the match with UNICODE locale enabled, and check # that it still succeeds. obj = re.compile(pattern, re.UNICODE) result = obj.search(s) if result is None: print '=== Fails on unicode-sensitive match', t def test_main(): run_unittest(ReTests) deprecations = [ ('bad escape', DeprecationWarning), ] with check_py3k_warnings(*deprecations): run_re_tests() if __name__ == "__main__": test_main()
[+]
..
[-] test_codecmaps_cn.py
[open]
[-] test_univnewlines.py
[open]
[-] test_cookie.pyo
[open]
[-] test_mmap.pyo
[open]
[-] test_gl.pyc
[open]
[-] test_bigmem.pyc
[open]
[-] test_shelve.pyo
[open]
[-] test_softspace.pyo
[open]
[-] test_future1.pyc
[open]
[-] test_gettext.pyc
[open]
[-] test_importlib.py
[open]
[-] test_global.pyc
[open]
[-] sortperf.pyc
[open]
[-] _mock_backport.pyc
[open]
[-] test_netrc.pyc
[open]
[-] test_codecencodings_iso2022.pyc
[open]
[-] badsyntax_future4.py
[open]
[-] test_xpickle.pyo
[open]
[-] test_userdict.pyo
[open]
[-] test_getargs2.py
[open]
[-] multibytecodec_support.pyc
[open]
[-] time_hashlib.pyc
[open]
[-] test_pty.pyo
[open]
[-] test_multifile.pyc
[open]
[-] test_bastion.py
[open]
[-] test_ast.py
[open]
[-] test_builtin.py
[open]
[-] test_unary.pyc
[open]
[-] test_wsgiref.pyc
[open]
[-] test_codecencodings_hk.pyo
[open]
[-] test___future__.py
[open]
[-] test_grammar.pyc
[open]
[-] test_abc.pyo
[open]
[-] xmltests.pyc
[open]
[-] test_threadsignals.pyo
[open]
[-] test_strtod.pyo
[open]
[-] test_undocumented_details.pyo
[open]
[-] test_future2.py
[open]
[-] test_SimpleHTTPServer.pyo
[open]
[-] test_sys_setprofile.pyo
[open]
[-] test_univnewlines2k.py
[open]
[-] test_xrange.py
[open]
[-] test_future3.py
[open]
[-] test_ossaudiodev.pyc
[open]
[-] test_hmac.py
[open]
[-] test_httpservers.pyc
[open]
[-] test_abstract_numbers.pyc
[open]
[-] test_resource.py
[open]
[-] test_threaded_import.pyc
[open]
[-] test_parser.pyc
[open]
[-] test_dictviews.pyc
[open]
[-] ssl_servers.pyo
[open]
[-] sample_doctest.pyc
[open]
[-] test_sets.py
[open]
[-] test_smtpnet.pyo
[open]
[-] test_math.py
[open]
[-] test_codecmaps_tw.py
[open]
[-] test_argparse.py
[open]
[-] test_richcmp.pyo
[open]
[-] test_asynchat.pyo
[open]
[-] test_funcattrs.pyo
[open]
[-] test_bsddb185.pyc
[open]
[-] test_pow.pyo
[open]
[-] test_scope.pyc
[open]
[-] test_strftime.py
[open]
[-] test_imaplib.pyo
[open]
[-] testcodec.pyc
[open]
[-] test_thread.pyc
[open]
[-] time_hashlib.py
[open]
[-] test_importhooks.py
[open]
[-] keycert.pem
[open]
[-] test_imghdr.py
[open]
[-] test_readline.pyc
[open]
[-] test_winreg.py
[open]
[-] test_zipimport.py
[open]
[-] lock_tests.pyo
[open]
[-] test_property.pyc
[open]
[-] test_threadsignals.pyc
[open]
[-] mp_fork_bomb.pyo
[open]
[-] test_stringprep.pyc
[open]
[-] recursion.tar
[open]
[-] test_dircache.pyc
[open]
[-] test_docxmlrpc.pyo
[open]
[-] test_gdb.pyc
[open]
[-] test_pprint.pyo
[open]
[-] test_wait3.pyc
[open]
[-] test_popen.pyo
[open]
[-] test_zipfile64.pyc
[open]
[-] test_pipes.pyc
[open]
[-] test_gl.py
[open]
[-] test_sys_settrace.pyc
[open]
[-] test_winsound.pyc
[open]
[-] test_urllib2_localnet.pyc
[open]
[-] test_with.py
[open]
[-] test_binhex.pyo
[open]
[-] test_import.py
[open]
[+]
imghdrdata
[-] sgml_input.html
[open]
[-] test_longexp.pyo
[open]
[-] test_macos.py
[open]
[-] test_bsddb.py
[open]
[-] bad_coding.py
[open]
[-] test_cmd_line_script.pyo
[open]
[-] test_unittest.pyc
[open]
[-] test_bool.py
[open]
[-] test_deque.pyc
[open]
[-] test_future_builtins.pyo
[open]
[-] test_ossaudiodev.pyo
[open]
[-] test_runpy.py
[open]
[-] test_pty.py
[open]
[-] test_mutants.py
[open]
[-] test_netrc.py
[open]
[-] test_gzip.pyo
[open]
[-] test_enumerate.pyc
[open]
[-] tf_inherit_check.pyo
[open]
[-] test_fractions.pyc
[open]
[-] sample_doctest_no_doctests.py
[open]
[-] badsyntax_future6.py
[open]
[-] test_compileall.pyc
[open]
[-] test_pep352.py
[open]
[-] test_ucn.pyc
[open]
[-] test_generators.py
[open]
[-] test_struct.pyo
[open]
[-] test_readline.pyo
[open]
[-] test_tempfile.pyo
[open]
[-] _mock_backport.pyo
[open]
[-] test_wsgiref.py
[open]
[-] test_multifile.pyo
[open]
[-] test_codecmaps_tw.pyc
[open]
[-] test_pstats.py
[open]
[-] string_tests.pyc
[open]
[-] test_structmembers.py
[open]
[-] test_capi.pyo
[open]
[-] pydoc_mod.pyc
[open]
[-] test_functools.pyc
[open]
[-] test_shelve.pyc
[open]
[-] test_str.pyc
[open]
[-] test_nis.pyc
[open]
[-] test_zipfile.pyc
[open]
[-] test_mmap.py
[open]
[-] test_structseq.pyo
[open]
[-] test_al.pyo
[open]
[-] test_base64.py
[open]
[-] test_dict.pyc
[open]
[-] test_modulefinder.pyc
[open]
[-] ssl_key.passwd.pem
[open]
[-] test_argparse.pyc
[open]
[-] testimgr.uue
[open]
[-] test__locale.py
[open]
[-] test_gc.pyo
[open]
[-] test_cookie.pyc
[open]
[-] test_eof.pyo
[open]
[-] test_grammar.pyo
[open]
[-] test_structmembers.pyo
[open]
[-] test_test_support.pyo
[open]
[-] test_timeout.pyc
[open]
[-] test_nis.py
[open]
[-] test_cl.py
[open]
[-] test_parser.pyo
[open]
[-] test_datetime.pyc
[open]
[-] test_richcmp.pyc
[open]
[-] test_urllib2_localnet.py
[open]
[-] test_sax.pyo
[open]
[-] test_mhlib.pyo
[open]
[-] test_abc.pyc
[open]
[-] mailcap.txt
[open]
[-] test_time.py
[open]
[-] test_doctest.pyc
[open]
[-] pyclbr_input.pyo
[open]
[-] test_structseq.py
[open]
[-] sample_doctest.py
[open]
[-] re_tests.pyo
[open]
[-] test_kqueue.py
[open]
[-] test___all__.py
[open]
[-] test_pkgimport.pyc
[open]
[-] test_inspect.pyo
[open]
[-] test_urllib.pyo
[open]
[-] test_codeop.pyo
[open]
[-] test_extcall.pyc
[open]
[-] test_xmllib.py
[open]
[-] test_json.pyc
[open]
[-] test_bigaddrspace.pyc
[open]
[-] test_codecs.py
[open]
[-] test_imaplib.pyc
[open]
[-] gdb_sample.pyc
[open]
[-] ssltests.pyo
[open]
[-] test_tuple.pyo
[open]
[-] test_with.pyc
[open]
[-] test_threading.py
[open]
[-] test_repr.py
[open]
[-] test_urllibnet.pyo
[open]
[-] test_itertools.py
[open]
[-] multibytecodec_support.pyo
[open]
[-] test_stringprep.pyo
[open]
[-] test_dumbdbm.pyc
[open]
[-] selfsigned_pythontestdotnet.pem
[open]
[-] badsyntax_future8.py
[open]
[-] test_unicode_file.pyo
[open]
[-] test__osx_support.pyo
[open]
[-] test_dummy_thread.py
[open]
[-] test_pwd.pyc
[open]
[-] xmltests.py
[open]
[-] test_cookielib.py
[open]
[-] test_csv.pyo
[open]
[-] test_crypt.pyo
[open]
[-] test_pickle.pyo
[open]
[-] test_mimetypes.pyo
[open]
[-] testimg.uue
[open]
[-] test_descr.pyo
[open]
[-] doctest_aliases.pyc
[open]
[-] test_code.py
[open]
[-] test_pyexpat.pyc
[open]
[-] test_warnings.pyc
[open]
[-] test_pkg.pyo
[open]
[-] relimport.py
[open]
[-] test_fractions.py
[open]
[-] revocation.crl
[open]
[-] test_cmd_line.py
[open]
[-] re_tests.pyc
[open]
[-] test_ensurepip.py
[open]
[-] test_urllib2net.pyo
[open]
[-] test_dircache.pyo
[open]
[-] test_dircache.py
[open]
[-] test_future_builtins.pyc
[open]
[-] test_memoryview.py
[open]
[-] test_int.py
[open]
[-] sortperf.pyo
[open]
[-] test_copy_reg.py
[open]
[-] test_datetime.py
[open]
[-] test_ioctl.pyo
[open]
[-] test_telnetlib.py
[open]
[-] test_extcall.pyo
[open]
[-] badsyntax_future7.py
[open]
[-] test_defaultdict.py
[open]
[-] test_bz2.pyo
[open]
[-] test_abc.py
[open]
[-] test_py_compile.pyo
[open]
[-] test_typechecks.pyc
[open]
[-] test_socket.pyc
[open]
[-] test_site.py
[open]
[-] test_plistlib.pyc
[open]
[-] test_email.pyo
[open]
[-] test_io.pyc
[open]
[-] test_locale.py
[open]
[-] test_popen2.pyc
[open]
[-] test_code.pyo
[open]
[-] test_bastion.pyo
[open]
[-] test_macostools.pyo
[open]
[-] test_peepholer.pyo
[open]
[-] test_mailcap.pyo
[open]
[-] test_dict.pyo
[open]
[-] test_thread.pyo
[open]
[-] test_syntax.pyc
[open]
[-] test_genexps.pyo
[open]
[-] test_ctypes.pyo
[open]
[-] test_pep352.pyo
[open]
[-] test_shutil.pyo
[open]
[-] randv2_64.pck
[open]
[-] test_decorators.pyc
[open]
[-] test_xmlrpc.pyo
[open]
[-] profilee.py
[open]
[-] nullbytecert.pem
[open]
[-] audiotests.pyc
[open]
[-] test_unpack.pyo
[open]
[-] test_xdrlib.py
[open]
[-] test_codecencodings_cn.pyo
[open]
[-] test_uu.py
[open]
[-] test_runpy.pyo
[open]
[-] test_calendar.py
[open]
[-] test_sets.pyc
[open]
[-] test_xrange.pyc
[open]
[-] test_compile.py
[open]
[-] test_mailbox.py
[open]
[-] test_capi.pyc
[open]
[-] test_ttk_textonly.py
[open]
[-] test_cookie.py
[open]
[-] test_uuid.pyc
[open]
[-] test_regrtest.pyc
[open]
[-] test_cfgparser.py
[open]
[-] talos-2019-0758.pem
[open]
[-] test_grp.py
[open]
[-] test_string.pyc
[open]
[-] test_socket.py
[open]
[-] test_colorsys.py
[open]
[-] test_imp.pyc
[open]
[-] test_urllib2net.py
[open]
[-] test_print.py
[open]
[-] test_bytes.pyo
[open]
[-] test_fork1.py
[open]
[-] keycert.passwd.pem
[open]
[-] script_helper.py
[open]
[-] test___all__.pyc
[open]
[-] test_zipimport_support.pyo
[open]
[-] test_httplib.pyc
[open]
[-] test_audioop.pyo
[open]
[-] test_complex_args.pyo
[open]
[-] test_linuxaudiodev.pyo
[open]
[-] re_tests.py
[open]
[-] double_const.pyo
[open]
[-] tokenize_tests.txt
[open]
[-] test_contextlib.pyc
[open]
[-] test_bsddb3.py
[open]
[-] test_json.pyo
[open]
[-] test_symtable.pyc
[open]
[-] pydoc_mod.pyo
[open]
[-] test_repr.pyo
[open]
[-] test_startfile.pyc
[open]
[-] warning_tests.pyc
[open]
[-] test_univnewlines2k.pyo
[open]
[-] test_tools.pyo
[open]
[-] test_file.pyc
[open]
[-] test_codecencodings_tw.pyc
[open]
[-] test_pickle.pyc
[open]
[-] regrtest.pyc
[open]
[-] mapping_tests.pyc
[open]
[-] test_gettext.pyo
[open]
[-] test_smtplib.py
[open]
[-] test_msilib.pyc
[open]
[-] test_getopt.pyo
[open]
[-] test_codeccallbacks.py
[open]
[-] inspect_fodder.pyo
[open]
[-] test_timeout.py
[open]
[-] symlink_support.pyc
[open]
[-] test_importlib.pyc
[open]
[-] test_compiler.py
[open]
[-] test_deque.pyo
[open]
[-] test_types.pyc
[open]
[-] test_fileinput.pyo
[open]
[-] test_uuid.py
[open]
[-] test_cfgparser.pyc
[open]
[-] autotest.py
[open]
[-] test_json.py
[open]
[-] zipdir.zip
[open]
[-] test_calendar.pyc
[open]
[-] list_tests.pyc
[open]
[-] test___future__.pyc
[open]
[-] test_codecmaps_kr.pyc
[open]
[-] test_sys.pyo
[open]
[-] test_rfc822.pyc
[open]
[-] test_pkg.pyc
[open]
[-] test_charmapcodec.py
[open]
[-] ssl_cert.pem
[open]
[-] test_cgi.pyo
[open]
[-] test_contains.pyc
[open]
[-] test_pty.py.tty-fail
[open]
[-] test_py3kwarn.py
[open]
[-] test_old_mailbox.pyc
[open]
[-] 185test.db
[open]
[-] test_unittest.py
[open]
[-] test_struct.py
[open]
[-] fork_wait.pyo
[open]
[-] test_doctest.py
[open]
[-] test_pprint.py
[open]
[-] pystone.py
[open]
[-] test_openpty.py.tty-fail
[open]
[-] test_cmd_line.pyo
[open]
[-] test_dis.pyo
[open]
[-] test_trace.py
[open]
[-] test_set.pyo
[open]
[-] pydocfodder.pyc
[open]
[-] test_getargs.py
[open]
[-] test_setcomps.pyo
[open]
[-] inspect_fodder.pyc
[open]
[-] profilee.pyc
[open]
[-] empty.vbs
[open]
[-] pystone.pyc
[open]
[-] test_array.py
[open]
[-] test_pyclbr.py
[open]
[-] test_symtable.pyo
[open]
[-] double_const.pyc
[open]
[-] test_collections.pyc
[open]
[-] test_zipimport.pyc
[open]
[-] test_bz2.py
[open]
[-] test_nis.pyo
[open]
[-] test_email_codecs.py
[open]
[-] test_bsddb.pyc
[open]
[-] test_bufio.pyc
[open]
[-] test_telnetlib.pyc
[open]
[-] test_string.pyo
[open]
[-] test_fcntl.py
[open]
[-] regrtest.pyo
[open]
[-] pythoninfo.pyo
[open]
[-] test_with.pyo
[open]
[-] test_userlist.py
[open]
[-] bad_coding2.py
[open]
[-] test_mmap.pyc
[open]
[-] test_gzip.pyc
[open]
[-] test_compiler.pyc
[open]
[-] test_undocumented_details.py
[open]
[-] test_al.pyc
[open]
[-] test_smtpnet.pyc
[open]
[-] test_slice.pyo
[open]
[-] test_future2.pyo
[open]
[-] symlink_support.py
[open]
[-] double_const.py
[open]
[-] test_getargs2.pyo
[open]
[-] test_defaultdict.pyc
[open]
[-] test_dl.pyc
[open]
[-] test_poll.pyc
[open]
[-] test_xml_etree_c.py
[open]
[-] test_float.pyo
[open]
[-] test_sundry.py
[open]
[-] test_file2k.py
[open]
[-] test_email.py
[open]
[-] test_sax.pyc
[open]
[-] test_popen2.py
[open]
[-] test_xml_etree.py
[open]
[-] test_softspace.pyc
[open]
[-] test_ftplib.pyc
[open]
[-] test_winsound.pyo
[open]
[-] test_sunau.pyo
[open]
[-] test_symtable.py
[open]
[-] test_io.py
[open]
[-] test_runpy.pyc
[open]
[-] test_genexps.pyc
[open]
[-] test_errno.pyc
[open]
[-] test_imghdr.pyo
[open]
[-] test_complex.py
[open]
[+]
capath
[-] keycert4.pem
[open]
[-] test_codecmaps_hk.pyo
[open]
[-] test_long_future.py
[open]
[-] test_aepack.pyc
[open]
[-] test_abstract_numbers.py
[open]
[-] test_mutex.py
[open]
[-] test_doctest2.txt
[open]
[-] test_imgfile.pyc
[open]
[-] test_pdb.pyo
[open]
[-] test_marshal.py
[open]
[-] test_bdb.pyc
[open]
[-] test_module.py
[open]
[-] test_import_magic.pyc
[open]
[-] test_robotparser.py
[open]
[-] test_nntplib.pyo
[open]
[-] test_idle.py
[open]
[-] test_weakset.py
[open]
[-] test_pydoc.py
[open]
[-] test_source_encoding.pyo
[open]
[-] test_gdb.py
[open]
[-] test_operator.py
[open]
[-] test_imgfile.pyo
[open]
[-] math_testcases.txt
[open]
[-] test_codecmaps_hk.py
[open]
[-] test_iterlen.pyc
[open]
[-] test_heapq.pyo
[open]
[-] test_macostools.pyc
[open]
[-] test_multiprocessing.py
[open]
[-] test_dbm.pyo
[open]
[-] test_codecmaps_jp.pyo
[open]
[-] test_mimetools.pyc
[open]
[-] test_linecache.py
[open]
[-] test_rlcompleter.py
[open]
[-] test_urlparse.py
[open]
[-] test_pydoc.pyo
[open]
[-] test_list.pyo
[open]
[-] lock_tests.pyc
[open]
[-] test_str.pyo
[open]
[-] test_zipfile64.py
[open]
[-] test_traceback.py
[open]
[-] test_marshal.pyo
[open]
[-] test_tk.py
[open]
[-] test_largefile.pyo
[open]
[-] test_compileall.py
[open]
[-] test_macpath.pyc
[open]
[-] test_builtin.pyc
[open]
[-] win_console_handler.pyo
[open]
[-] bisect_cmd.py
[open]
[-] test_compile.pyc
[open]
[-] ssltests.py
[open]
[-] test_popen2.pyo
[open]
[-] test_stat.py
[open]
[-] test_unicode.pyo
[open]
[-] test_pkgutil.py
[open]
[-] testcodec.pyo
[open]
[-] test_ttk_textonly.pyc
[open]
[-] string_tests.pyo
[open]
[-] test_spwd.pyo
[open]
[-] threaded_import_hangers.py
[open]
[-] test_csv.py
[open]
[-] formatfloat_testcases.txt
[open]
[-] seq_tests.py
[open]
[-] test_ntpath.pyc
[open]
[-] test___all__.pyo
[open]
[-] test_memoryio.pyo
[open]
[-] test_MimeWriter.pyc
[open]
[-] test_anydbm.pyo
[open]
[-] test_shlex.py
[open]
[-] test_coercion.pyo
[open]
[-] test_hotshot.py
[open]
[-] test_colorsys.pyc
[open]
[-] inspect_fodder2.py
[open]
[-] test_index.pyc
[open]
[-] test_genericpath.pyc
[open]
[-] test_ucn.pyo
[open]
[-] test_winreg.pyc
[open]
[-] test_nntplib.pyc
[open]
[-] test_audioop.pyc
[open]
[-] test_applesingle.py
[open]
[-] test_compare.py
[open]
[-] test_sunaudiodev.pyo
[open]
[-] test_socket.pyo
[open]
[-] test_xmlrpc.py
[open]
[-] profilee.pyo
[open]
[-] test_buffer.pyc
[open]
[-] test_curses.py
[open]
[-] test_typechecks.py
[open]
[-] test_htmlparser.pyo
[open]
[-] test_gdbm.py
[open]
[-] test_rlcompleter.pyc
[open]
[-] list_tests.pyo
[open]
[-] test_buffer.py
[open]
[-] badsyntax_future9.py
[open]
[-] cmath_testcases.txt
[open]
[-] test_pickletools.pyc
[open]
[-] test_doctest2.py
[open]
[-] test_getopt.pyc
[open]
[-] test_aifc.py
[open]
[-] test_tools.pyc
[open]
[-] audiotests.py
[open]
[-] test_time.pyo
[open]
[-] test_gettext.py
[open]
[-] test_strtod.py
[open]
[-] test_threadedtempfile.py
[open]
[-] test_mhlib.pyc
[open]
[-] __init__.pyc
[open]
[-] test_signal.py
[open]
[-] test_urllib2.py
[open]
[-] test_shutil.pyc
[open]
[-] test_userlist.pyc
[open]
[-] test_aifc.pyo
[open]
[-] inspect_fodder.py
[open]
[-] bisect_cmd.pyo
[open]
[-] test_winreg.pyo
[open]
[-] test_unpack.py
[open]
[-] test_pipes.py
[open]
[-] test_xmllib.pyc
[open]
[-] relimport.pyo
[open]
[-] test_eof.pyc
[open]
[-] test_augassign.pyo
[open]
[-] test_contextlib.pyo
[open]
[-] test_os.pyc
[open]
[-] test_urlparse.pyc
[open]
[-] test_decorators.py
[open]
[-] test_bigaddrspace.py
[open]
[-] test_codecencodings_iso2022.py
[open]
[-] test_optparse.pyc
[open]
[-] test_dbm.pyc
[open]
[-] test_threadsignals.py
[open]
[-] test_doctest.txt
[open]
[-] test_ossaudiodev.py
[open]
[-] randv2_32.pck
[open]
[-] test_openpty.pyc
[open]
[-] test_module.pyc
[open]
[-] ffdh3072.pem
[open]
[-] ssl_key.pem
[open]
[-] test_charmapcodec.pyc
[open]
[-] test_tcl.pyc
[open]
[-] test_ntpath.pyo
[open]
[-] test_binascii.pyo
[open]
[-] test_imp.py
[open]
[-] test_base64.pyc
[open]
[-] test_csv.pyc
[open]
[-] test_wave.py
[open]
[-] test_wait4.pyo
[open]
[-] test_multibytecodec.pyo
[open]
[-] test_hashlib.py
[open]
[-] test_pwd.py
[open]
[-] test_wait4.pyc
[open]
[-] test_multibytecodec.py
[open]
[-] regrtest.py
[open]
[-] test_bufio.pyo
[open]
[-] test_opcodes.py
[open]
[-] test_profile.pyo
[open]
[-] __main__.py
[open]
[-] test_bastion.pyc
[open]
[-] test_httpservers.py
[open]
[-] badsyntax_future3.py
[open]
[-] test_cfgparser.pyo
[open]
[-] script_helper.pyc
[open]
[-] test_format.pyc
[open]
[-] greyrgb.uue
[open]
[-] test_strptime.pyo
[open]
[-] nokia.pem
[open]
[-] pydocfodder.pyo
[open]
[-] test_contains.pyo
[open]
[-] test_imageop.py
[open]
[-] test_bigmem.pyo
[open]
[-] test_crypt.py
[open]
[-] test_decimal.py
[open]
[-] test_generators.pyc
[open]
[-] test_mhlib.py
[open]
[-] test_old_mailbox.py
[open]
[-] test_sys_setprofile.py
[open]
[-] test_userstring.pyc
[open]
[-] test_codecencodings_jp.pyo
[open]
[-] test_stringprep.py
[open]
[-] test_cprofile.pyc
[open]
[-] test_curses.pyc
[open]
[-] test_spwd.py
[open]
[-] test_undocumented_details.pyc
[open]
[-] test_zipfile64.pyo
[open]
[-] test_format.pyo
[open]
[-] test_sunau.pyc
[open]
[-] test_anydbm.pyc
[open]
[-] test_subprocess.pyc
[open]
[-] test_unary.pyo
[open]
[-] test_bsddb.pyo
[open]
[-] multibytecodec_support.py
[open]
[-] test_stat.pyc
[open]
[-] test_time.pyc
[open]
[-] ssltests.pyc
[open]
[-] test_codecmaps_kr.py
[open]
[-] test_zlib.pyc
[open]
[-] test_slice.py
[open]
[-] test_import_magic.py
[open]
[-] test_tools.py
[open]
[-] test_thread.py
[open]
[-] test_math.pyc
[open]
[-] test_fcntl.pyc
[open]
[-] test_ascii_formatd.pyc
[open]
[-] test_enumerate.py
[open]
[-] test_file_eintr.py
[open]
[-] test_file.py
[open]
[-] test_minidom.pyo
[open]
[-] test_site.py.lib64
[open]
[-] exception_hierarchy.txt
[open]
[-] test_binop.py
[open]
[-] test_textwrap.pyc
[open]
[-] test_new.py
[open]
[-] test_urlparse.pyo
[open]
[-] test_py_compile.py
[open]
[-] test_cpickle.pyc
[open]
[-] test_macpath.pyo
[open]
[-] test_gzip.py
[open]
[-] test_popen.py
[open]
[-] test_long.pyc
[open]
[-] test_httpservers.pyo
[open]
[-] test_wave.pyc
[open]
[-] test_codecencodings_kr.pyc
[open]
[-] test_pkgimport.py
[open]
[-] test_setcomps.pyc
[open]
[-] test_md5.py
[open]
[-] test_mimetools.py
[open]
[-] test_posixpath.py
[open]
[-] test_peepholer.py
[open]
[-] test_bsddb185.py
[open]
[-] test_unicodedata.pyo
[open]
[-] test_future_builtins.py
[open]
[-] test_MimeWriter.py
[open]
[-] pycacert.pem
[open]
[-] test_StringIO.pyc
[open]
[-] test_capi.py
[open]
[-] test_shelve.py
[open]
[-] test_mimetypes.pyc
[open]
[-] test_os.pyo
[open]
[-] test_ascii_formatd.py
[open]
[-] test_peepholer.pyc
[open]
[-] test_whichdb.pyo
[open]
[-] test_descrtut.pyc
[open]
[-] test_codecmaps_jp.py
[open]
[-] test_memoryio.py
[open]
[-] test_index.pyo
[open]
[-] test_scriptpackages.pyo
[open]
[-] test_platform.pyo
[open]
[-] reperf.pyo
[open]
[-] audiotests.pyo
[open]
[-] test_asynchat.py
[open]
[-] test_asyncore.pyo
[open]
[-] test_exception_variations.pyc
[open]
[-] test__osx_support.pyc
[open]
[-] test_funcattrs.py
[open]
[-] test_iter.pyc
[open]
[-] test_parser.py
[open]
[-] test_warnings.pyo
[open]
[-] keycert2.pem
[open]
[-] test_getargs.pyo
[open]
[-] test_traceback.pyo
[open]
[-] test_importhooks.pyo
[open]
[-] test_idle.pyc
[open]
[-] sample_doctest_no_doctests.pyo
[open]
[-] test_int_literal.pyc
[open]
[-] test_support.py
[open]
[-] test_long_future.pyc
[open]
[-] test_urllib.py
[open]
[-] test_plistlib.py
[open]
[-] test_scriptpackages.pyc
[open]
[-] test_sysconfig.py
[open]
[-] script_helper.pyo
[open]
[-] test_sgmllib.py
[open]
[-] test_userstring.pyo
[open]
[-] test_dictviews.pyo
[open]
[-] test_descr.py
[open]
[-] test_decimal.pyc
[open]
[-] nullcert.pem
[open]
[-] test_glob.pyo
[open]
[-] test_future.pyc
[open]
[-] test_sundry.pyo
[open]
[-] test_cmd_line_script.py
[open]
[-] test_idle.pyo
[open]
[-] test_minidom.py
[open]
[-] test_rlcompleter.pyo
[open]
[-] test_epoll.pyc
[open]
[-] test_urllibnet.py
[open]
[-] autotest.pyc
[open]
[-] test_generators.pyo
[open]
[-] test_structmembers.pyc
[open]
[-] floating_points.txt
[open]
[-] test_weakref.py
[open]
[-] test_builtin.pyo
[open]
[-] test_itertools.pyo
[open]
[-] test_zipimport.pyo
[open]
[-] test_getopt.py
[open]
[-] test_new.pyc
[open]
[-] test_test_support.py
[open]
[-] test_binascii.py
[open]
[-] test_wait3.pyo
[open]
[-] test_strftime.pyc
[open]
[-] test_macos.pyc
[open]
[-] test_frozen.pyc
[open]
[-] test_md5.pyc
[open]
[-] test_startfile.pyo
[open]
[-] test_codeccallbacks.pyc
[open]
[-] test_email.pyc
[open]
[-] test_curses.pyo
[open]
[+]
support
[-] test_copy.pyo
[open]
[-] test_pow.pyc
[open]
[-] test_threading_local.py
[open]
[-] test_glob.pyc
[open]
[-] test_htmlparser.py
[open]
[-] test_platform.pyc
[open]
[-] test_pep277.pyc
[open]
[-] test_optparse.py
[open]
[-] test_logging.py
[open]
[-] test_file_eintr.pyc
[open]
[-] test_bisect.pyc
[open]
[-] test_htmllib.pyo
[open]
[-] test_cmath.pyc
[open]
[-] test_dbm.py
[open]
[-] test_binascii.pyc
[open]
[-] test_dictcomps.pyc
[open]
[-] test_locale.pyc
[open]
[-] test_random.pyo
[open]
[-] test_imp.pyo
[open]
[-] test_fileio.py
[open]
[-] test_anydbm.py
[open]
[-] test_tk.pyc
[open]
[-] test_dis.py
[open]
[-] test_ast.pyo
[open]
[-] list_tests.py
[open]
[-] test_plistlib.pyo
[open]
[-] test_select.pyc
[open]
[-] test_robotparser.pyo
[open]
[-] test_unicodedata.pyc
[open]
[-] test_ssl.py
[open]
[-] test_email_renamed.pyc
[open]
[-] test_errno.py
[open]
[-] test_call.pyo
[open]
[-] test_pkgimport.pyo
[open]
[-] test_signal.pyc
[open]
[-] test_io.pyo
[open]
[-] relimport.pyc
[open]
[-] test_ordered_dict.py
[open]
[-] test_tokenize.py
[open]
[-] test_unicodedata.py
[open]
[-] test_memoryio.pyc
[open]
[-] test_optparse.pyo
[open]
[-] test_imaplib.py
[open]
[-] test_glob.py
[open]
[-] test_pickletools.pyo
[open]
[-] test_enumerate.pyo
[open]
[-] test_fork1.pyc
[open]
[-] test_os.py
[open]
[-] test_ordered_dict.pyo
[open]
[-] test_email_codecs.pyo
[open]
[-] test_bisect.py
[open]
[-] test_sort.pyo
[open]
[-] test_py3kwarn.pyc
[open]
[-] test_codecmaps_tw.pyo
[open]
[-] test_zlib.py
[open]
[-] test_list.pyc
[open]
[-] test_wsgiref.pyo
[open]
[-] test_mailbox.pyc
[open]
[-] test_poll.pyo
[open]
[-] test_uu.pyc
[open]
[-] test_unicode_file.pyc
[open]
[-] test_ttk_guionly.py
[open]
[-] test_stat.pyo
[open]
[-] test_platform.py
[open]
[-] test_heapq.pyc
[open]
[-] test_ttk_textonly.pyo
[open]
[-] test_structseq.pyc
[open]
[-] test_complex.pyo
[open]
[-] test_macurl2path.pyo
[open]
[-] doctest_aliases.pyo
[open]
[-] test_dis.pyc
[open]
[-] test_bool.pyo
[open]
[-] test___future__.pyo
[open]
[-] test_pyexpat.py
[open]
[-] test_threadedtempfile.pyo
[open]
[-] test_nntplib.py
[open]
[-] test_regrtest.pyo
[open]
[-] test_ctypes.pyc
[open]
[-] test_copy_reg.pyc
[open]
[-] threaded_import_hangers.pyc
[open]
[-] win_console_handler.pyc
[open]
[-] test_strop.pyc
[open]
[-] test_profile.pyc
[open]
[-] test_codecencodings_hk.py
[open]
[-] test_codecmaps_cn.pyc
[open]
[-] test_cpickle.py
[open]
[-] test_functools.py
[open]
[-] test_int_literal.py
[open]
[-] test_wave.pyo
[open]
[-] test_distutils.py
[open]
[-] test_sha.pyc
[open]
[-] test_ttk_guionly.pyo
[open]
[-] test_grp.pyc
[open]
[-] test_float.pyc
[open]
[-] test_mimetools.pyo
[open]
[-] testall.py
[open]
[-] test_hash.pyo
[open]
[-] test_fileio.pyc
[open]
[-] test_funcattrs.pyc
[open]
[-] testall.pyo
[open]
[-] test_mutex.pyo
[open]
[-] test_buffer.pyo
[open]
[-] test_email_renamed.pyo
[open]
[-] test_math.pyo
[open]
[-] test_pickletools.py
[open]
[-] test_popen.pyc
[open]
[-] test_xml_etree.pyo
[open]
[-] test_xml_etree.pyc
[open]
[-] test_future4.py
[open]
[-] gdb_sample.py
[open]
[-] tf_inherit_check.py
[open]
[-] test_gdb.pyo
[open]
[-] test_macos.pyo
[open]
[-] test_getargs2.pyc
[open]
[-] test_ntpath.py
[open]
[-] test_trace.pyc
[open]
[-] test_cgi.py
[open]
[-] test_pyclbr.pyc
[open]
[-] test_frozen.py
[open]
[-] test_tarfile.pyc
[open]
[-] win_console_handler.py
[open]
[-] test_profile.py
[open]
[-] test_transformer.pyo
[open]
[-] fork_wait.py
[open]
[-] test_sys.pyc
[open]
[-] test_pyexpat.pyo
[open]
[-] test_slice.pyc
[open]
[-] outstanding_bugs.py
[open]
[-] test_sysconfig.pyc
[open]
[-] test_sax.py
[open]
[-] lock_tests.py
[open]
[-] test_univnewlines.pyc
[open]
[-] test_queue.py
[open]
[-] test_sets.pyo
[open]
[-] test_largefile.pyc
[open]
[-] test_pep247.py
[open]
[-] test_zipfile.pyo
[open]
[-] test_index.py
[open]
[-] test_eof.py
[open]
[-] test_urllib2_localnet.pyo
[open]
[-] test_hmac.pyc
[open]
[-] test_traceback.pyc
[open]
[-] test_module.pyo
[open]
[-] test_fcntl.pyo
[open]
[-] test_tcl.py
[open]
[-] test_cookielib.pyc
[open]
[-] test_hotshot.pyo
[open]
[-] test_bufio.py
[open]
[-] __main__.pyo
[open]
[-] test_tuple.py
[open]
[-] test_binhex.py
[open]
[-] test_ordered_dict.pyc
[open]
[-] test_socketserver.pyo
[open]
[-] test_rfc822.pyo
[open]
[-] test_urllibnet.pyc
[open]
[-] test_dummy_thread.pyo
[open]
[-] test_htmllib.py
[open]
[-] test_set.py
[open]
[-] test_coercion.py
[open]
[-] test_fileinput.pyc
[open]
[-] test_atexit.py
[open]
[-] badkey.pem
[open]
[-] test_frozen.pyo
[open]
[-] test_class.py
[open]
[-] test_logging.pyc
[open]
[-] test_weakset.pyc
[open]
[-] test_queue.pyc
[open]
[-] test_dictcomps.py
[open]
[-] test_urllib2.pyc
[open]
[-] test_multibytecodec.pyc
[open]
[-] test_normalization.py
[open]
[-] test_cmath.pyo
[open]
[-] test_imageop.pyo
[open]
[-] sortperf.py
[open]
[-] testrgb.uue
[open]
[-] test_sundry.pyc
[open]
[-] test_zlib.pyo
[open]
[-] test_cmd_line_script.pyc
[open]
[-] test__osx_support.py
[open]
[-] test_pow.py
[open]
[-] test_codeccallbacks.pyo
[open]
[-] test_hotshot.pyc
[open]
[-] test_aepack.pyo
[open]
[-] test_tokenize.pyo
[open]
[-] test_codecencodings_iso2022.pyo
[open]
[-] test_shlex.pyc
[open]
[-] badcert.pem
[open]
[-] test_atexit.pyo
[open]
[-] test_cmd.pyo
[open]
[-] test_rfc822.py
[open]
[-] test_fork1.pyo
[open]
[-] test_unittest.pyo
[open]
[-] test_trace.pyo
[open]
[+]
data
[-] mp_fork_bomb.pyc
[open]
[-] inspect_fodder2.pyc
[open]
[-] test_difflib.py
[open]
[-] test_dummy_threading.py
[open]
[-] test_kqueue.pyc
[open]
[-] test_dictcomps.pyo
[open]
[-] test_wait4.py
[open]
[-] test_genericpath.py
[open]
[-] test_fpformat.py
[open]
[-] test_resource.pyc
[open]
[-] test_ftplib.py
[open]
[-] test_pkgutil.pyc
[open]
[-] test_bool.pyc
[open]
[-] test_isinstance.py
[open]
[-] testtar.tar
[open]
[-] test_grammar.py
[open]
[-] test_cpickle.pyo
[open]
[-] test_bsddb3.pyc
[open]
[-] test_textwrap.py
[open]
[-] test_linuxaudiodev.py
[open]
[-] test_str.py
[open]
[-] test_print.pyo
[open]
[-] test_doctest2.pyo
[open]
[-] test_timeit.pyo
[open]
[-] test_gdbm.pyc
[open]
[-] test_pyclbr.pyo
[open]
[-] test_property.pyo
[open]
[-] test_file.pyo
[open]
[-] test_itertools.pyc
[open]
[-] test_urllib.pyc
[open]
[-] test_copy.py
[open]
[-] test_linuxaudiodev.pyc
[open]
[-] test_ioctl.py
[open]
[-] test_userdict.pyc
[open]
[-] test_minidom.pyc
[open]
[-] test_argparse.pyo
[open]
[-] test_netrc.pyo
[open]
[-] test_zipfile.py
[open]
[-] test_operator.pyo
[open]
[-] test_whichdb.py
[open]
[-] symlink_support.pyo
[open]
[-] test_dictviews.py
[open]
[-] test_md5.pyo
[open]
[-] test_tk.pyo
[open]
[-] outstanding_bugs.pyo
[open]
[-] test_asyncore.pyc
[open]
[-] pickletester.py
[open]
[-] test_spwd.pyc
[open]
[-] test_colorsys.pyo
[open]
[-] test_sgmllib.pyo
[open]
[-] inspect_fodder2.pyo
[open]
[-] test_cookielib.pyo
[open]
[-] test_genexps.py
[open]
[-] sample_doctest_no_doctests.pyc
[open]
[-] test_quopri.pyc
[open]
[-] test_unpack.pyc
[open]
[-] test_turtle.pyo
[open]
[-] test_compile.pyo
[open]
[-] test_codecmaps_kr.pyo
[open]
[-] test_format.py
[open]
[-] test_importlib.pyo
[open]
[-] test_strftime.pyo
[open]
[-] test_filecmp.pyo
[open]
[-] infinite_reload.py
[open]
[-] test_normalization.pyo
[open]
[-] test_gc.py
[open]
[-] outstanding_bugs.pyc
[open]
[-] test_xpickle.py
[open]
[-] test_commands.pyc
[open]
[-] test_collections.pyo
[open]
[-] test_complex_args.pyc
[open]
[-] test_xdrlib.pyo
[open]
[-] test_strptime.pyc
[open]
[-] test_softspace.py
[open]
[-] test_pwd.pyo
[open]
[-] test_SimpleHTTPServer.pyc
[open]
[-] test_lib2to3.py
[open]
[-] test_zipimport_support.py
[open]
[-] test_coercion.pyc
[open]
[-] test_bsddb3.pyo
[open]
[-] test_py3kwarn.pyo
[open]
[-] test_print.pyc
[open]
[-] test_sys_settrace.pyo
[open]
[-] test_codecencodings_kr.py
[open]
[-] test_bdb.pyo
[open]
[-] test_robotparser.pyc
[open]
[-] test_pep247.pyo
[open]
[-] test_ssl.pyc
[open]
[-] test_scriptpackages.py
[open]
[-] test_binop.pyc
[open]
[-] test_atexit.pyc
[open]
[-] test_unicode.pyc
[open]
[-] test_cl.pyc
[open]
[-] test_charmapcodec.pyo
[open]
[-] test_descr.pyc
[open]
[-] test_fractions.pyo
[open]
[-] test_difflib.pyo
[open]
[-] test_getargs.pyc
[open]
[-] test_fpformat.pyo
[open]
[-] test_asyncore.py
[open]
[-] test_posix.pyo
[open]
[-] test_bsddb185.pyo
[open]
[-] test_inspect.pyc
[open]
[+]
subprocessdata
[-] test_winsound.py
[open]
[-] test_poplib.pyo
[open]
[-] gdb_sample.pyo
[open]
[-] pythoninfo.pyc
[open]
[-] test_pydoc.pyc
[open]
[-] test_dumbdbm.pyo
[open]
[-] test_pdb.pyc
[open]
[-] test_commands.pyo
[open]
[-] test_bisect.pyo
[open]
[-] test_bdb.py
[open]
[-] test_richcmp.py
[open]
[-] test_array.pyc
[open]
[-] pickletester.pyc
[open]
[-] test_binhex.pyc
[open]
[-] sample_doctest_no_docstrings.pyc
[open]
[-] test_cprofile.pyo
[open]
[-] test_scope.pyo
[open]
[-] test_sqlite.pyc
[open]
[-] test_htmllib.pyc
[open]
[-] test_imghdr.pyc
[open]
[+]
audiodata
[-] test_unicode.py
[open]
[-] test_difflib.pyc
[open]
[-] test_aifc.pyc
[open]
[-] test_complex.pyc
[open]
[-] test_MimeWriter.pyo
[open]
[-] test_iterlen.pyo
[open]
[-] test_openpty.py
[open]
[-] test_bz2.pyc
[open]
[-] warning_tests.py
[open]
[-] test_smtplib.pyc
[open]
[-] test_timeit.pyc
[open]
[-] test_augassign.py
[open]
[-] test_codecmaps_jp.pyc
[open]
[-] test_longexp.py
[open]
[-] test_grp.pyo
[open]
[-] test_cmd.pyc
[open]
[-] test_doctest.pyo
[open]
[-] test_multiprocessing.pyo
[open]
[-] test_iter.pyo
[open]
[-] test_calendar.pyo
[open]
[-] test_global.py
[open]
[-] test_distutils.pyc
[open]
[-] test_pickle.py
[open]
[-] test_ctypes.py
[open]
[-] test_htmlparser.pyc
[open]
[-] test_ascii_formatd.pyo
[open]
[-] test_long.py
[open]
[-] test_regrtest.py
[open]
[-] test_difflib_expect.html
[open]
[-] test_modulefinder.pyo
[open]
[-] test_augassign.pyc
[open]
[-] mp_fork_bomb.py
[open]
[-] test_random.py
[open]
[-] test_codeop.pyc
[open]
[-] test_ucn.py
[open]
[-] test_exceptions.pyc
[open]
[-] test_import.pyc
[open]
[-] test_marshal.pyc
[open]
[-] reperf.py
[open]
[-] test_decorators.pyo
[open]
[-] test_future4.pyo
[open]
[-] test_whichdb.pyc
[open]
[-] test_strop.py
[open]
[-] test_compileall.pyo
[open]
[-] test_gc.pyc
[open]
[-] test_select.py
[open]
[-] seq_tests.pyo
[open]
[-] test_weakref.pyo
[open]
[-] test_crypt.pyc
[open]
[-] test__locale.pyo
[open]
[-] test_hmac.pyo
[open]
[+]
decimaltestdata
[-] test_univnewlines2k.pyc
[open]
[-] test_userdict.py
[open]
[-] test_xml_etree_c.pyc
[open]
[-] test_SimpleHTTPServer.py
[open]
[-] test_shlex.pyo
[open]
[-] infinite_reload.pyo
[open]
[-] test_future3.pyc
[open]
[-] test_userstring.py
[open]
[-] testcodec.py
[open]
[-] pythoninfo.py
[open]
[-] test_opcodes.pyo
[open]
[-] test_hashlib.pyc
[open]
[-] test_string.py
[open]
[-] test_call.py
[open]
[-] test_pipes.pyo
[open]
[-] test_locale.pyo
[open]
[-] test_sort.pyc
[open]
[-] test_distutils.pyo
[open]
[-] test_sunaudiodev.py
[open]
[-] pydocfodder.py
[open]
[-] curses_tests.pyo
[open]
[-] xmltests.pyo
[open]
[-] test_codecencodings_jp.pyc
[open]
[-] test_poplib.py
[open]
[-] test_uu.pyo
[open]
[-] warning_tests.pyo
[open]
[-] test_struct.pyc
[open]
[-] test_pprint.pyc
[open]
[-] test_mimetypes.py
[open]
[-] test_random.pyc
[open]
[-] test_syntax.pyo
[open]
[-] test_sort.py
[open]
[-] test_logging.pyo
[open]
[-] test_genericpath.pyo
[open]
[-] test_cprofile.py
[open]
[-] test_site.pyc
[open]
[-] test_long_future.pyo
[open]
[-] test_select.pyo
[open]
[-] test_codecs.pyc
[open]
[-] pyclbr_input.py
[open]
[+]
cjkencodings
[-] test_linecache.pyc
[open]
[-] test_abstract_numbers.pyo
[open]
[-] test_repr.pyc
[open]
[-] test_startfile.py
[open]
[-] test_future5.pyc
[open]
[-] test_threading_local.pyo
[open]
[-] test_py_compile.pyc
[open]
[-] test_mutex.pyc
[open]
[-] test_cd.pyc
[open]
[-] test_socketserver.pyc
[open]
[-] ssl_servers.pyc
[open]
[-] infinite_reload.pyc
[open]
[-] test_filecmp.py
[open]
[-] autotest.pyo
[open]
[-] test_aepack.py
[open]
[-] test_docxmlrpc.py
[open]
[-] pydoc_mod.py
[open]
[-] __init__.py
[open]
[-] test_cmd.py
[open]
[-] test_datetime.pyo
[open]
[-] test_gdbm.pyo
[open]
[-] test_base64.pyo
[open]
[-] test_dumbdbm.py
[open]
[-] test_threading.pyo
[open]
[-] test_turtle.py
[open]
[-] test_kqueue.pyo
[open]
[-] test_errno.pyo
[open]
[-] test_wait3.py
[open]
[-] test_mailbox.pyo
[open]
[-] test_dummy_threading.pyo
[open]
[-] test_smtplib.pyo
[open]
[-] test_normalization.pyc
[open]
[-] test_posix.pyc
[open]
[-] test_poplib.pyc
[open]
[-] test_readline.py
[open]
[-] sample_doctest.pyo
[open]
[-] test_operator.pyc
[open]
[-] test_gl.pyo
[open]
[-] test_posixpath.pyo
[open]
[-] test_sunaudiodev.pyc
[open]
[-] test_pstats.pyc
[open]
[-] test_filecmp.pyc
[open]
[-] test_warnings.py
[open]
[-] test_uuid.pyo
[open]
[-] test_class.pyc
[open]
[-] test_future5.pyo
[open]
[-] test_support.pyc
[open]
[-] test__locale.pyc
[open]
[-] test_re.pyc
[open]
[-] test_tempfile.pyc
[open]
[-] test_memoryview.pyo
[open]
[-] test_httplib.pyo
[open]
[-] test_file2k.py.stdin-test
[open]
[-] threaded_import_hangers.pyo
[open]
[-] test_codecencodings_cn.pyc
[open]
[-] mapping_tests.py
[open]
[-] test_multifile.py
[open]
[-] test_cd.py
[open]
[-] test_subprocess.pyo
[open]
[-] tf_inherit_check.pyc
[open]
[-] test_mutants.pyo
[open]
[-] test_global.pyo
[open]
[-] test_future.py
[open]
[-] test_exceptions.pyo
[open]
[-] test_compiler.pyo
[open]
[-] test_fnmatch.pyo
[open]
[-] test_pdb.py
[open]
[-] ieee754.txt
[open]
[-] test_exceptions.py
[open]
[-] test_cmath.py
[open]
[-] test_copy_reg.pyo
[open]
[-] test_site.pyo
[open]
[-] test_xdrlib.pyc
[open]
[-] test_mailcap.py
[open]
[-] test_pep352.pyc
[open]
[+]
tracedmodules
[-] test_tokenize.pyc
[open]
[-] test_bytes.py
[open]
[-] make_ssl_certs.pyc
[open]
[-] doctest_aliases.py
[open]
[-] test_subprocess.py
[open]
[-] test_defaultdict.pyo
[open]
[-] test_smtpnet.py
[open]
[-] randv3.pck
[open]
[-] test_timeout.pyo
[open]
[-] string_tests.py
[open]
[-] test_fileio.pyo
[open]
[-] test_modulefinder.py
[open]
[-] test_hash.pyc
[open]
[-] test_dl.pyo
[open]
[-] keycert3.pem
[open]
[-] test_sgmllib.pyc
[open]
[-] test_tarfile.pyo
[open]
[-] pystone.pyo
[open]
[-] test_resource.pyo
[open]
[-] test_cmd_line.pyc
[open]
[-] test_codecencodings_tw.pyo
[open]
[-] test_userlist.pyo
[open]
[-] test_macurl2path.py
[open]
[-] test_collections.py
[open]
[-] test_sys.py
[open]
[-] test_bigmem.py
[open]
[-] test_xmlrpc.pyc
[open]
[-] test_sqlite.pyo
[open]
[-] test_contains.py
[open]
[-] test_unary.py
[open]
[-] test_poll.py
[open]
[-] test_longexp.pyc
[open]
[-] test_threadedtempfile.pyc
[open]
[-] test_lib2to3.pyo
[open]
[-] test_macurl2path.pyc
[open]
[-] pickletester.pyo
[open]
[-] test_msilib.pyo
[open]
[-] test_future1.pyo
[open]
[-] test_hashlib.pyo
[open]
[-] test_hash.py
[open]
[-] test_doctest3.txt
[open]
[-] test_unicode_file.py
[open]
[-] test_socketserver.py
[open]
[-] test_deque.py
[open]
[-] test_future1.py
[open]
[-] test_msilib.py
[open]
[-] test_test_support.pyc
[open]
[-] test_set.pyc
[open]
[-] test_functools.pyo
[open]
[-] test_re.py
[open]
[-] test_macpath.py
[open]
[-] test_inspect.py
[open]
[-] test_codecs.pyo
[open]
[-] test_commands.py
[open]
[-] test_weakref.pyc
[open]
[-] test_fnmatch.pyc
[open]
[-] test_posixpath.pyc
[open]
[-] test_tcl.pyo
[open]
[-] test_turtle.pyc
[open]
[-] test_int_literal.pyo
[open]
[-] test_sys_settrace.py
[open]
[-] test_transformer.py
[open]
[-] allsans.pem
[open]
[-] test_complex_args.py
[open]
[-] test_threading.pyc
[open]
[-] test_lib2to3.pyc
[open]
[-] test_ssl.pyo
[open]
[-] test_xml_etree_c.pyo
[open]
[-] test_isinstance.pyc
[open]
[-] pyclbr_input.pyc
[open]
[-] test_tuple.pyc
[open]
[-] test_docxmlrpc.pyc
[open]
[-] test_compare.pyc
[open]
[-] test_property.py
[open]
[-] test_cl.pyo
[open]
[+]
xmltestdata
[-] test_codecmaps_cn.pyo
[open]
[-] test_threaded_import.py
[open]
[-] test_types.py
[open]
[-] test_quopri.py
[open]
[-] test_exception_variations.py
[open]
[-] test_file2k.pyo
[open]
[-] test_pstats.pyo
[open]
[-] test_call.pyc
[open]
[-] test_pep277.pyo
[open]
[-] test_mutants.pyc
[open]
[-] test_int.pyc
[open]
[-] test_mailcap.pyc
[open]
[-] test_syntax.py
[open]
[-] test_xmllib.pyo
[open]
[-] test_ensurepip.pyo
[open]
[-] test_file_eintr.pyo
[open]
[-] test_ioctl.pyc
[open]
[-] test_linecache.pyo
[open]
[-] test_iter.py
[open]
[-] test_isinstance.pyo
[open]
[-] test_strptime.py
[open]
[-] test_descrtut.py
[open]
[-] test_sha.py
[open]
[-] test_codecencodings_kr.pyo
[open]
[-] test_importhooks.pyc
[open]
[-] badsyntax_future5.py
[open]
[-] test_memoryview.pyc
[open]
[-] badsyntax_nocaret.py
[open]
[-] test_iterlen.py
[open]
[-] test_email_renamed.py
[open]
[-] seq_tests.pyc
[open]
[-] test_imageop.pyc
[open]
[-] bad_coding3.py
[open]
[-] test_import.pyo
[open]
[-] test_opcodes.pyc
[open]
[-] make_ssl_certs.py
[open]
[-] test_types.pyo
[open]
[-] test_decimal.pyo
[open]
[-] test_univnewlines.pyo
[open]
[-] test_sqlite.py
[open]
[-] test_queue.pyo
[open]
[-] test_posix.py
[open]
[-] sample_doctest_no_docstrings.py
[open]
[-] test_macostools.py
[open]
[-] test_threaded_import.pyo
[open]
[-] test_sysconfig.pyo
[open]
[-] test_openpty.pyo
[open]
[-] test_pty.pyc
[open]
[-] test_ensurepip.pyc
[open]
[-] test_StringIO.pyo
[open]
[-] curses_tests.pyc
[open]
[-] test_multiprocessing.pyc
[open]
[-] test_shutil.py
[open]
[-] test_al.py
[open]
[-] test_cd.pyo
[open]
[-] test_email_codecs.pyc
[open]
[-] test_telnetlib.pyo
[open]
[-] test_doctest4.txt
[open]
[-] curses_tests.py
[open]
[-] test_future4.pyc
[open]
[-] test_weakset.pyo
[open]
[-] test_ttk_guionly.pyc
[open]
[-] test_codecencodings_cn.py
[open]
[-] test_applesingle.pyo
[open]
[-] mapping_tests.pyo
[open]
[-] cfgparser.1
[open]
[-] test_codecencodings_jp.py
[open]
[-] test_pkg.py
[open]
[-] test_codecmaps_hk.pyc
[open]
[-] test_exception_variations.pyo
[open]
[-] test_old_mailbox.pyo
[open]
[-] test_future.pyo
[open]
[-] Sine-1000Hz-300ms.aif
[open]
[-] test_strop.pyo
[open]
[-] test_asynchat.pyc
[open]
[-] test_float.py
[open]
[-] test_epoll.pyo
[open]
[-] test_source_encoding.pyc
[open]
[-] test_int.pyo
[open]
[-] test_future2.pyc
[open]
[-] test_zipimport_support.pyc
[open]
[-] test_applesingle.pyc
[open]
[-] test_fnmatch.py
[open]
[-] test_future3.pyo
[open]
[-] test_extcall.py
[open]
[-] bisect_cmd.pyc
[open]
[-] test_StringIO.py
[open]
[-] test_imgfile.py
[open]
[-] test_quopri.pyo
[open]
[-] test_list.py
[open]
[-] test_sha.pyo
[open]
[-] test_bigaddrspace.pyo
[open]
[-] test_tempfile.py
[open]
[-] make_ssl_certs.pyo
[open]
[-] time_hashlib.pyo
[open]
[-] test_codecencodings_tw.py
[open]
[-] test_setcomps.py
[open]
[-] test_threading_local.pyc
[open]
[-] sample_doctest_no_docstrings.pyo
[open]
[-] test_ftplib.pyo
[open]
[-] test_binop.pyo
[open]
[-] test_file2k.pyc
[open]
[-] reperf.pyc
[open]
[-] test_dict.py
[open]
[-] test_pep277.py
[open]
[-] test_largefile.py
[open]
[-] test_xrange.pyo
[open]
[-] test_new.pyo
[open]
[-] test_class.pyo
[open]
[-] fork_wait.pyc
[open]
[-] ssl_servers.py
[open]
[-] test_dl.py
[open]
[-] test_audioop.py
[open]
[-] test_strtod.pyc
[open]
[-] test_sunau.py
[open]
[-] __init__.pyo
[open]
[-] test_cgi.pyc
[open]
[-] test_textwrap.pyo
[open]
[-] test_tarfile.py
[open]
[-] test_pkgutil.pyo
[open]
[-] test_fileinput.py
[open]
[-] test_array.pyo
[open]
[-] test_copy.pyc
[open]
[-] test_future5.py
[open]
[-] test_dummy_threading.pyc
[open]
[-] test_urllib2net.pyc
[open]
[-] test_scope.py
[open]
[-] test_code.pyc
[open]
[-] test_signal.pyo
[open]
[-] test_xpickle.pyc
[open]
[-] test_epoll.py
[open]
[-] test_httplib.py
[open]
[-] testall.pyc
[open]
[-] test_sys_setprofile.pyc
[open]
[-] test_dummy_thread.pyc
[open]
[-] test_ast.pyc
[open]
[-] test_timeit.py
[open]
[-] test_descrtut.pyo
[open]
[-] test_doctest2.pyc
[open]
[-] test_pep247.pyc
[open]
[-] test_import_magic.pyo
[open]
[-] test_compare.pyo
[open]
[-] test_urllib2.pyo
[open]
[-] test_source_encoding.py
[open]
[-] test_fpformat.pyc
[open]
[-] __main__.pyc
[open]
[-] test_bytes.pyc
[open]
[-] test_contextlib.py
[open]
[-] test_codecencodings_hk.pyc
[open]
[-] test_codeop.py
[open]
[-] test_re.pyo
[open]
[-] test_heapq.py
[open]
[-] test_typechecks.pyo
[open]
[-] test_transformer.pyc
[open]
[-] _mock_backport.py
[open]
[-] test_long.pyo
[open]
[-] test_support.pyo
[open]