summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_string.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #25034: Merge from 3.4.Eric V. Smith2015-09-291-0/+2
|\
| * Fixed issue #25034: Fix string.Formatter problem with auto-numberingEric V. Smith2015-09-291-0/+2
| | | | | | | | and nested format_specs. Patch by Anthon van der Neut.
* | #11754: test contents of string module attributes.R David Murray2015-04-141-9/+13
| | | | | | | | | | | | | | | | As noted in the comment, while the order of the items in the attributes is not technically guaranteed, after all this time there is almost certainly user code out there that relies on it, so we might as well test for it. Patch by Chalmer Lowe.
* | Issue #21741: Update 147 test modules to use test discovery.Zachary Ware2015-04-131-5/+1
| | | | | | | | | | | | | | I have compared output between pre- and post-patch runs of these tests to make sure there's nothing missing and nothing broken, on both Windows and Linux. The only differences I found were actually tests that were previously *not* run.
* | Issue #23671: string.Template now allows to specify the "self" parameter asSerhiy Storchaka2015-03-241-0/+15
|\ \ | |/ | | | | | | keyword argument. string.Formatter now allows to specify the "self" and the "format_string" parameters as keyword arguments.
| * Issue #23671: string.Template now allows to specify the "self" parameter asSerhiy Storchaka2015-03-241-0/+14
|/ | | | | keyword argument. string.Formatter now allows to specify the "self" and the "format_string" parameters as keyword arguments.
* Issue #13598: Add auto-numbering of replacement fields to string.Formatter.Eric V. Smith2014-04-141-0/+17
|
* Merge #13579: teach string.Formatter about 'a'.R David Murray2012-08-191-0/+6
|\ | | | | | | Patch by Francisco Martín Brugué.
| * #13579: teach string.Formatter about 'a'.R David Murray2012-08-191-0/+12
| | | | | | | | Patch by Francisco Martín Brugué.
| * Backport improved test coverage for string.pyNick Coghlan2011-03-161-0/+24
| |
* | Tidy up the additional string module tests added at the Pycon sprints ↵Nick Coghlan2011-05-311-30/+38
| | | | | | | | (closes #11505)
* | #11515: Merge with 3.2.Ezio Melotti2011-03-151-1/+1
|\ \ | |/
| * #11515: fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-151-1/+1
| |
| * Merged revisions 75074 via svnmerge fromEzio Melotti2009-09-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r75074 | ezio.melotti | 2009-09-26 15:33:22 +0300 (Sat, 26 Sep 2009) | 9 lines Merged revisions 75070 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75070 | ezio.melotti | 2009-09-26 14:20:53 +0300 (Sat, 26 Sep 2009) | 1 line #7000: document "sep" in capwords. Add a few tests ........ ................
| * Merged revisions 75072 via svnmerge fromEzio Melotti2009-09-261-0/+8
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r75072 | ezio.melotti | 2009-09-26 15:19:30 +0300 (Sat, 26 Sep 2009) | 1 line string.capwords is still around, adding back the tests ........
* | Close #11505: Improve string.py coverageNick Coghlan2011-03-141-0/+24
| |
* | Merged revisions 75070 via svnmerge fromEzio Melotti2009-09-261-0/+3
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r75070 | ezio.melotti | 2009-09-26 14:20:53 +0300 (Sat, 26 Sep 2009) | 1 line #7000: document "sep" in capwords. Add a few tests ........
* | string.capwords is still around, adding back the testsEzio Melotti2009-09-261-0/+8
|/
* Add bytes/bytearray.maketrans() to mirror str.maketrans(), and deprecateGeorg Brandl2009-04-121-8/+0
| | | | string.maketrans() which actually works on bytes. (Also closes #5675.)
* #2621 rename test.test_support to test.supportBenjamin Peterson2008-05-201-2/+2
|
* string.maketrans() now produces translation tables for bytes.translate() -- ↵Georg Brandl2007-08-311-3/+4
| | | | | | wrong module? Fix all remaining instances that did bad things with the new str.translate().
* Changed signature of string.Formatter.get_field, per suggestion byEric Smith2007-08-311-0/+22
| | | | | | Ron Adam. Added test case for using all parameters in string.Formatter.
* Added test cases for string.Formatter subclassing.Eric Smith2007-08-311-0/+38
| | | | | Made format_spec parameter to builtin format optional, defaults to empty string. Added test cases.
* PEP 3101: Completed string.Formatter class. Reimplemented field_name to ↵Eric Smith2007-08-261-2/+21
| | | | object transformation.
* Implementation of PEP 3101, Advanced String Formatting.Eric Smith2007-08-251-0/+8
| | | | | | | | | | | | | | | Known issues: The string.Formatter class, as discussed in the PEP, is incomplete. Error handling needs to conform to the PEP. Need to fix this warning that I introduced in Python/formatter_unicode.c: Objects/stringlib/unicodedefs.h:26: warning: `STRINGLIB_CMP' defined but not used Need to make sure sign formatting is correct, more tests needed. Need to remove '()' sign formatting, left over from an earlier version of the PEP.
* Remove string.{letters,lowercase,uppercase}.Martin v. Löwis2007-08-141-3/+3
|
* Remove functions in string module that are also string methods. Also remove:Neal Norwitz2007-04-171-87/+2
| | | | | * all calls to functions in the string module (except maketrans) * everything from stropmodule except for maketrans() which is still used
* Rip out 'long' and 'L'-suffixed integer literals.Guido van Rossum2007-01-151-1/+1
| | | | (Rough first cut.)
* SF patch 1631942 by Collin Winter:Guido van Rossum2007-01-101-1/+1
| | | | | | (a) "except E, V" -> "except E as V" (b) V is now limited to a simple name (local variable) (c) V is now deleted at the end of the except block
* Fix bug:Michael W. Hudson2005-10-211-0/+11
| | | | | | | | [ 1327110 ] wrong TypeError traceback in generator expressions by removing the code that can stomp on the users' TypeError raised by the iterable argument to ''.join() -- PySequence_Fast (now?) gives a perfectly reasonable message itself. Also, a couple of tests.
* Move test_bug1001011() to string_tests.MixinStrUnicodeTest so thatWalter Dörwald2004-08-261-22/+0
| | | | | | it can be used for str and unicode. Drop the test for "".join([s]) is s because this is an implementation detail (and doesn't work for unicode)
* SF Patch #1007087: Return new string for single subclass joins (Bug #1001011)Raymond Hettinger2004-08-231-0/+23
| | | | | | | (Patch contributed by Nick Coghlan.) Now joining string subtypes will always return a string. Formerly, if there were only one item, it was returned unchanged.
* Combine the functionality of test_support.run_unittest()Walter Dörwald2003-05-011-4/+1
| | | | | | | | | | 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.
* Port all string tests to PyUnit and share as much testsWalter Dörwald2003-02-211-84/+104
| | | | | | | between str, unicode, UserString and the string module as possible. This increases code coverage in stringobject.c from 83% to 86% and should help keep the string classes in sync in the future. From SF patch #662807
* Whitespace normalization.Tim Peters2003-02-191-1/+0
|
* String tests should test 8-bit strings :-)Marc-André Lemburg2002-12-301-1/+1
|
* Patch for bug #659709: bogus computation of float lengthMarc-André Lemburg2002-12-291-0/+26
| | | | | Python 2.2.x backport candidate. (This bug has been around since Python 1.6.)
* Moved inplace add and multiply methods from UserString to MutableString.Raymond Hettinger2002-08-091-0/+1
| | | | | Closes SF Bug #592573 where inplace add mutated a UserString. Added unittests to verify the bug is cleared.
* Committing patch #591250 which provides "str1 in str2" when str1 is aBarry Warsaw2002-08-061-0/+1
| | | | string of longer than 1 character.
* Get rid of relative imports in all unittests. Now anything thatBarry Warsaw2002-07-231-2/+2
| | | | | | | | | | | 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. :)
* Whitespace normalization.Tim Peters2002-05-231-1/+1
|
* Apply diff3.txt from SF patch http://www.python.org/sf/536241Walter Dörwald2002-04-171-0/+19
| | | | | | | | | If a str or unicode method returns the original object, make sure that for str and unicode subclasses the original will not be returned. This should prevent SF bug http://www.python.org/sf/460020 from reappearing.
* test(): Avoid a UnboundLocalError when a method is missing from both the stringFinn Bock2001-12-091-0/+1
| | | | | | module and from string methods. This closes patch "[ #490811 ] Jython and test_string".
* a bold attempt to fix things broken by MAL's verify patch: importFredrik Lundh2001-01-171-1/+1
| | | | 'verify' iff it's used by a test module...
* This patch removes all uses of "assert" in the regression test suiteMarc-André Lemburg2001-01-171-1/+1
| | | | | | | 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.
* Make reindent.py happy (convert everything to 4-space indents!).Fred Drake2000-10-231-2/+1
|
* Raise 'TestSkipped' (from the test_support) module rather than 'ImportError'Thomas Wouters2000-08-041-2/+2
| | | | | to signify a test that should be marked as 'skipped' rather than 'failed'. Also 'document' it, in README.
* factor out test definitions to string_tests moduleJeremy Hylton2000-07-101-166/+4
| | | | test_string and test_userstring run same tests for string methods
* Added tests for the new .isalpha() and .isalnum() methods.Marc-André Lemburg2000-07-051-0/+15
|
* Marc-Andre Lemburg:Guido van Rossum2000-04-111-2/+1
| | | | | Modified .splitlines() tests according to the changes in stringobject.c.