summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pprint.py
Commit message (Collapse)AuthorAgeFilesLines
* pprint functions used to sort a dict (by key) if and only ifTim Peters2006-06-021-4/+31
| | | | | | | | | | | the output required more than one line. "Small" dicts got displayed in seemingly random order (the hash-induced order produced by dict.__repr__). None of this was documented. Now pprint functions always sort dicts by key, and the docs promise it. This was proposed and agreed to during the PyCon 2006 core sprint -- I just didn't have time for it before now.
* Replace backticks with repr() or "%r"Walter Dörwald2004-02-121-13/+13
| | | | From SF patch #852334.
* Add parameters indent, width and depth to pprint.pprint() and pprint.pformat()Walter Dörwald2003-12-031-0/+6
| | | | and pass them along to the PrettyPrinter constructor.
* Patch #750542: pprint now will pretty print subclasses of list, tupleWalter Dörwald2003-12-031-4/+39
| | | | and dict too, as long as they don't overwrite __repr__().
* Make sure PrettyPrinter methods that mirror the module-levelFred Drake2002-12-311-3/+27
| | | | | convenience functions isreadable() and isrecursive() work the same way as the convenience functions.
* Standardize behavior: no docstrings in test functions.Guido van Rossum2002-08-221-5/+6
|
* Get rid of relative imports in all unittests. Now anything thatBarry Warsaw2002-07-231-2/+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. :)
* Add an experimental mechanism to support extending the pprint formatting.Fred Drake2002-04-021-0/+21
| | | | Partly responds to SF bug #505152.
* __format(): Applied SF patch #482003 by Skip to fix multiline dictBarry Warsaw2001-11-281-0/+19
| | | | | | | | output. Patch includes additional test case test_basic_line_wrap(). This patch is a candidate for Python 2.1.2.
* Change the PyUnit-based tests to use the test_main() approach. ThisFred Drake2001-09-201-1/+7
| | | | | allows using the tests with unittest.py as a script. The tests will still run when run as a script themselves.
* Patch #445762: Support --disable-unicodeMartin v. Löwis2001-08-171-3/+8
| | | | | | | | - Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled - check for Py_USING_UNICODE in all places that use Unicode functions - disables unicode literals, and the builtin functions - add the types.StringTypes list - remove Unicode literals from most tests.
* Convert a couple of comments to docstrings -- PyUnit can use these whenFred Drake2001-05-141-2/+2
| | | | the regression test is run in verbose mode.
* pprint's workhorse _safe_repr() function took time quadratic in the # ofTim Peters2001-05-141-1/+17
| | | | | | | elements when crunching a list, dict or tuple. Now takes linear time instead -- huge speedup for even moderately large containers, and the code is notably simpler too. Added some basic "is the output correct?" tests to test_pprint.
* Convert the pprint test to use PyUnit.Fred Drake2001-05-141-35/+57
|
* SF bug[ #423781: pprint.isrecursive() broken.Tim Peters2001-05-141-0/+36