summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_inspect.py
Commit message (Collapse)AuthorAgeFilesLines
* Patch #1159931: a test case for the buggy cases fixed by the last checkin.Johannes Gijsbers2005-03-121-1/+1
|
* Patch #1006219: let inspect.getsource show '@' decorators and add tests forJohannes Gijsbers2004-08-181-0/+41
| | | | | this (which are rather ugly, but it'll have to do until test_inspect gets a major overhaul and a conversion to unittest). Thanks Simon Percivall!
* - Bug #891637, patch #1005466: fix inspect.getargs() crash on def foo((bar)).Matthias Klose2004-08-151-0/+8
|
* [Bug #954364] inspect.getframeinfo() sometimes produces incorrect traceback ↵Andrew M. Kuchling2004-06-051-2/+2
| | | | line #s; fix is to look at tb.tb_lineno, not tb.frame.f_lineno. Patch from Robin Becker and me.
* Patch #830858: Correct the number of is-functions. Backported to 2.3 and 2.2.Martin v. Löwis2003-10-311-0/+4
|
* Add a trivial test of getargspec() with a method.Jeremy Hylton2003-06-271-16/+21
|
* Refer to __builtin__.file, not __builtins__.fileMartin v. Löwis2003-05-031-2/+3
|
* Patch #711902: Cause pydoc to show data descriptor __doc__ strings.Martin v. Löwis2003-05-031-0/+3
|
* getdoc():Ka-Ping Yee2002-11-301-1/+1
| | | | | | Remove leading whitespace from first line; remove leading and trailing blank lines from docstrings. (Patch 645938 submitted by David Goodger.)
* 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. :)
* Remove obsolete __dynamic__ distinction.Tim Peters2001-10-151-74/+1
|
* New function classify_class_attrs(). As a number of SF bug reportsTim Peters2001-09-231-0/+201
| | | | | | | | | | | | | | | | | | | point out, pydoc doesn't tell you where class attributes were defined, gets several new 2.2 features wrong, and isn't aware of some new features checked in on Thursday <wink>. pydoc is hampered in part because inspect.py has the same limitations. Alas, I can't think of a way to fix this within the current architecture of inspect/pydoc: it's simply not possible in 2.2 to figure out everything needed just from examining the object you get back from class.attr. You also need the class context, and the method resolution order, and tests against various things that simply didn't exist before. OTOH, knowledge of how to do that is getting quite complex, so doesn't belong in pydoc. classify_class_attrs takes a different approach, analyzing all the class attrs "at once", and returning the most interesting stuff for each, all in one gulp. pydoc needs to be reworked to use this for classes (instead of the current "filter dir(class) umpteen times against assorted predicates" approach).
* Add a function to compute a class's method resolution order. This isTim Peters2001-09-221-0/+20
| | | | | | easy for 2.2 new-style classes, but trickier for classic classes, and different approaches are needed "depending". The function will allow later code to treat all flavors of classes uniformly.
* Don't have trace() skip the top frame; return them all.Ka-Ping Yee2001-03-231-5/+7
|
* Clean up junk files left behind by imp.load_source().Tim Peters2001-03-041-1/+7
|
* Replace literal '@test' with TESTFN.Ka-Ping Yee2001-03-021-6/+6
|
* inspect: a module for getting information out of live Python objectsKa-Ping Yee2001-02-271-0/+207