Commit Graph

30 Commits

Author SHA1 Message Date
Benjamin Peterson 5c8da86f3a convert usage of fail* to assert* 2009-06-30 22:57:08 +00:00
Brett Cannon 2ee0e8eaec Revert the renaming of repr to reprlib. 2008-05-23 05:03:59 +00:00
Alexandre Vassalotti a8eaf8faf3 Rename the test file of reprlib. 2008-05-16 07:14:08 +00:00
Alexandre Vassalotti 50a1acb2ab Changed references to the reprlib module to use its new name. 2008-05-16 06:58:49 +00:00
Benjamin Peterson 9ec4aa01f9 Replace instances of os.path.walk with os.walk 2008-05-08 22:09:54 +00:00
Georg Brandl 8fd3ecf928 Bug #1153: repr.repr() now doesn't require set and dictionary items
to be orderable to properly represent them.
2007-09-12 19:00:07 +00:00
Neal Norwitz c161cb9955 Bug #1734723: Fix repr.Repr() so it doesn't ignore the maxtuple attribute.
Will backport
2007-06-11 07:29:43 +00:00
Brett Cannon c745df8519 Remove unneeded imports of 'warnings'. 2006-12-13 23:02:38 +00:00
Neal Norwitz 008b861bf0 Don't fail if the (sub)pkgname already exist. 2006-05-30 07:21:10 +00:00
Neil Schemenauer ab541bb98e Revert change, func_name of lambda's is back to <lambda>. 2005-10-21 18:11:40 +00:00
Jeremy Hylton 3e0055f8c6 Merge ast-branch to head
This change implements a new bytecode compiler, based on a
transformation of the parse tree to an abstract syntax defined in
Parser/Python.asdl.

The compiler implementation is not complete, but it is in stable
enough shape to run the entire test suite excepting two disabled
tests.
2005-10-20 19:59:25 +00:00
Raymond Hettinger 1453e4aa75 * teach repr.repr() about collections.deque()
* rename a variable for clarity
2004-05-21 23:01:18 +00:00
Raymond Hettinger ba6cd3647f * Updated repr.py to handle set() and frozenset().
* Factored out common code to a single private function.
* Use str.join() instead of + concatenation
* Loop over elements directly instead of using indexing
* Use % operator for formatting
2004-05-21 10:00:15 +00:00
Walter Dörwald 70a6b49821 Replace backticks with repr() or "%r"
From SF patch #852334.
2004-02-12 17:35:32 +00:00
Tim Peters 6ee0480521 [680789] Debug with long array takes forever
Added array.array to the types repr.py knows about, after a suggestion
from Jurjen N.E. Bos.
2003-02-05 18:29:34 +00:00
Mark Hammond d800ae12f2 This test previously failed when run from the 'test' directory. In that
case, the test module created is actually a sub-package of 'test', thus
the module is named 'test.areallylongpackage...' - this caused failure.

Replace the hard-coded module names with __name__ attributes, which
correctly reflects any hierarchy.
2003-01-16 04:56:52 +00:00
Barry Warsaw 04f357cffe Get rid of relative imports in all unittests. Now anything that
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. :)
2002-07-23 19:04:11 +00:00
Fred Drake e08fda912f Remove all tests that rely on deprecated-in-2.2 features of xrange objects.
"What's New in Python 2.2" documented that these would be removed in
Python 2.3.
2002-05-02 18:40:31 +00:00
Tim Peters d392506c43 Tighten up some warning filters, and break some dependencies on the
order in which the tests are normally run.
2002-04-16 01:27:44 +00:00
Neal Norwitz 707690132f SF Patch #494872 test repr() of a built-in module 2001-12-29 00:25:42 +00:00
Tim Peters a427a2b8d0 Rename "dictionary" (type and constructor) to "dict". 2001-10-29 22:25:45 +00:00
Guido van Rossum e2ae77b8b8 SF patch #474590 -- RISC OS support 2001-10-24 20:42:55 +00:00
Guido van Rossum a4cb78874c Change repr() of a new-style class to say <class 'ClassName'> rather
than <type 'ClassName'>.  Exception: if it's a built-in type or an
extension type, continue to call it <type 'ClassName>.  Call me a
wimp, but I don't want to break more user code than necessary.
2001-09-25 03:56:29 +00:00
Fred Drake 2e2be3760c Change the PyUnit-based tests to use the test_main() approach. This
allows using the tests with unittest.py as a script.  The tests will
still run when run as a script themselves.
2001-09-20 21:33:42 +00:00
Jeremy Hylton dd32138e7d limit prefix test for lambda
the compiler package generates a module-unique trailing suffix for
each lambda
2001-09-14 23:01:49 +00:00
Jack Jansen a44361ea36 LongReprTest fails on the Mac because it uses filenames with more than
32 characters per component. This makes mkdir() calls and such fail with EINVAL.

For now I am disabling the test on the Mac, and I'll open a bugreport.
2001-09-05 20:08:07 +00:00
Guido van Rossum cf856f9f28 Add a test for the final branch in repr.Repr.repr1(), which deals with
a default repr() that's longer than 20 characters.
2001-09-05 02:26:26 +00:00
Barry Warsaw 0bcf6d8d54 Added lots of tests for reprs of "simple" objects, such as file,
lambda (anonymous functions?), function, xrange, buffer, cell (need to
fill in), and (some) descriptor types.

Also added a new test case for testing repr truncation fixes.
2001-08-24 18:37:32 +00:00
Tim Peters ab9ba27dc0 Whitespace normalization. 2001-08-09 21:40:30 +00:00
Fred Drake 8e6669ad05 Test for the repr module, contributed by Nick Mathewson.
This closes SF patch #440826.
2001-07-19 22:27:56 +00:00