summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_re.py
Commit message (Collapse)AuthorAgeFilesLines
* Whitespace normalization.Tim Peters2004-01-181-1/+1
|
* Implemented non-recursive SRE matching.Gustavo Niemeyer2003-10-171-7/+7
|
* Fix and test for bug #764548:Just van Rossum2003-07-021-0/+10
| | | | | | Use isinstance() instead of comparing types directly, to enable subclasses of str and unicode to be used as patterns. Blessed by /F.
* fixed typo in commentJust van Rossum2003-07-021-1/+1
|
* Many new tests, based on gcov's coverage information.Gustavo Niemeyer2003-06-201-0/+172
| | | | | | From gcov's output (based on a locally changed _sre.c): 82.07% of 1372 source lines executed in file ./Modules/_sre.c
* Combine the functionality of test_support.run_unittest()Walter Dörwald2003-05-011-4/+2
| | | | | | | | | | and test_support.run_classtests() into run_unittest() and use it wherever possible. Also don't use "from test.test_support import ...", but "from test import test_support" in a few spots. From SF patch #662807.
* Fix for part of the problem mentioned in #725149 by Greg Chapman.Gustavo Niemeyer2003-04-271-0/+7
| | | | | | | | | | | | | | | | | | | This problem is related to a wrong behavior from mark_save/restore(), which don't restore the mark_stack_base before restoring the marks. Greg's suggestion was to change the asserts, which happen to be the only recursive ops that can continue the loop, but the problem would happen to any operation with the same behavior. So, rather than hardcoding this into asserts, I have changed mark_save/restore() to always restore the stackbase before restoring the marks. Both solutions should fix these two cases, presented by Greg: >>> re.match('(a)(?:(?=(b)*)c)*', 'abb').groups() ('b', None) >>> re.match('(a)((?!(b)*))*', 'abb').groups() ('b', None, None) The rest of the bug and patch in #725149 must be discussed further.
* Applied patch #725106, by Greg Chapman, fixing capturing groupsGustavo Niemeyer2003-04-271-0/+19
| | | | | | | | | | | | | | | | | | | | within repeats of alternatives. The only change to the original patch was to convert the tests to the new test_re.py file. This patch fixes cases like: >>> re.match('((a)|b)*', 'abc').groups() ('b', '') Which is wrong (it's impossible to match the empty string), and incompatible with other regex systems, like the following examples show: % perl -e '"abc" =~ /^((a)|b)*/; print "$1 $2\n";' b a % echo "abc" | sed -r -e "s/^((a)|b)*/\1 \2|/" b a|c
* final bit of tests converted from test_sreSkip Montanaro2003-04-251-8/+25
|
* more tests converted from test_sreSkip Montanaro2003-04-251-14/+35
|
* more tests from test_sreSkip Montanaro2003-04-251-2/+44
|
* copy a few tests from test_sreSkip Montanaro2003-04-251-0/+15
|
* Fix test_limitations(). The match there is *expected* to raiseGuido van Rossum2003-04-251-1/+6
| | | | RuntimeError.
* first cut at unittest version of re testsSkip Montanaro2003-04-241-374/+297
|
* Complete the absolute import patch for the test suite. All relativeBarry Warsaw2002-07-301-1/+1
| | | | | | | | imports of test modules now import from the test package. Other related oddities are also fixed (like DeprecationWarning filters that weren't specifying the full import part, etc.). Also did a general code cleanup to remove all "from test.test_support import *"'s. Other from...import *'s weren't changed.
* Get rid of relative imports in all unittests. Now anything thatBarry Warsaw2002-07-231-1/+1
| | | | | | | | | | | imports e.g. test_support must do so using an absolute package name such as "import test.test_support" or "from test import test_support". This also updates the README in Lib/test, and gets rid of the duplicate data dirctory in Lib/test/data (replaced by Lib/email/test/data). Now Tim and Jack can have at it. :)
* Check in a testcase for SF bug #449000: re.sub(r'\n', ...) broke.Guido van Rossum2001-08-101-0/+6
|
* SRE 2.1b1: don't do unicode tests under 1.5.2, or on unicodeFredrik Lundh2001-03-221-3/+8
| | | | strings/patterns.
* String method conversion.Eric S. Raymond2001-02-091-1/+1
| | | | (This one was trivial -- no actual string. references in it!)
* This patch removes all uses of "assert" in the regression test suiteMarc-André Lemburg2001-01-171-74/+76
| | | | | | | and replaces them with a new API verify(). As a result the regression suite will also perform its tests in optimization mode. Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
* Update the code to better reflect recommended style:Fred Drake2000-12-121-11/+11
| | | | | Use != instead of <> since <> is documented as "obsolescent". Use "is" and "is not" when comparing with None or type objects.
* Make reindent.py happy (convert everything to 4-space indents!).Fred Drake2000-10-231-1/+1
|
* Better conformance to the Python Style Guide: use spaces around operators.Fred Drake2000-08-181-32/+33
|
* -- enabled some temporarily disabled RE testsFredrik Lundh2000-08-081-6/+32
| | | | | -- added basic unicode tests to test_re -- added test case for Sjoerd's xmllib problem to re_tests
* -- whitespace cleanup (more tests to be added in the next commit)Fredrik Lundh2000-08-081-23/+23
|
* Comment out repeated-group test for the momentAndrew M. Kuchling2000-08-031-1/+1
|
* Add nasty test case that overflows the stack with a repeated groupAndrew M. Kuchling2000-08-031-0/+4
|
* Switch to sre for regular expression matching (the new mini-re moduleGuido van Rossum2000-06-301-4/+4
| | | | | is actually by Fredrik Lundh). This will break the re tests -- Fredrik will fix this before the final release.
* Added tests for findall().Guido van Rossum1998-07-171-1/+21
| | | | | Added test for m.groups() with default. Added a few prints announcing various tests in verbose mode.
* Remove RCS and #! cruft at top.Guido van Rossum1998-06-261-4/+0
|
* AMK's latestGuido van Rossum1998-04-031-13/+92
|
* Mass check-in after untabifying all files that need it.Guido van Rossum1998-03-261-68/+68
|
* Added tests for qualified sub and splitGuido van Rossum1998-01-141-0/+15
|
* Add tests for re.L(OCALE).Guido van Rossum1997-12-301-1/+7
|
* New re version from AMKGuido van Rossum1997-12-081-8/+42
|
* Change test for re.sub() involving g<...> to use a multi-characterGuido van Rossum1997-10-081-1/+1
| | | | | identifier. The previous re.py had a bug that wouldn't show up with single-char identifier...
* The re test suite is very slow on slower hosts.Guido van Rossum1997-09-041-0/+3
| | | | To save time, only run the first and last 10 tests except in verbose mode.
* 1.5a3 prerelease 1 from AMKGuido van Rossum1997-08-131-1/+12
|
* Some new tests by JeffreyGuido van Rossum1997-07-181-11/+72
|
* Added tests for sub, subn, and split.Guido van Rossum1997-07-171-1/+47
|
* Jeffrey's latest -- seems to solve most problems!Guido van Rossum1997-07-171-6/+18
|
* Merged Jeffrey's changes in.Guido van Rossum1997-07-151-1/+8
|
* Tweak re_tests and test_re to differentiate betweenGuido van Rossum1997-07-151-1/+1
| | | | groups that have no value and groups that are out of bounds.
* More tweaks; re.py is nearly there...Guido van Rossum1997-07-151-4/+3
|
* Removed the traceback output in non-verbose modeGuido van Rossum1997-07-111-1/+2
|
* Some small nits.Guido van Rossum1997-07-111-3/+5
|
* test suite for re.pyGuido van Rossum1997-07-111-0/+56