summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_inspect.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #18830: inspect.getclasstree() no more produces duplicated entries evenSerhiy Storchaka2013-09-051-2/+19
| | | | when input list contains duplicates.
* #17526: fix an IndexError raised while passing code without filename to ↵Ezio Melotti2013-03-301-0/+6
| | | | inspect.findsource(). Initial patch by Tyler Doyle.
* Issue #17071: Signature.bind() now works when one of the keyword arguments ↵Antoine Pitrou2013-01-291-0/+10
| | | | is named ``self``.
* Fix test_inspect messing up with linecache.cache.Antoine Pitrou2012-07-081-3/+9
|
* Properly test the various builtins lookup cases in inspect.getclosurevarsNick Coghlan2012-06-231-0/+24
|
* Use non-deprecated speling.Antoine Pitrou2012-06-231-44/+44
|
* Close #15153: Added inspect.getgeneratorlocals to simplify whitebox testing ↵Nick Coghlan2012-06-231-0/+46
| | | | of generator state updates
* Close #13062: Add inspect.getclosurevars to simplify testing stateful closuresNick Coghlan2012-06-231-1/+100
|
* Issue #15008: Implement PEP 362 "Signature Objects".Larry Hastings2012-06-221-1/+922
| | | | Patch by Yury Selivanov.
* Prevent test_inspect from keeping alive a ton of frames and local variables ↵Antoine Pitrou2012-06-171-12/+15
| | | | | | by way of a global variable keeping a reference to a traceback. Should fix some buildbot failures.
* Merge more test vs hashing-order fixes from 3.2.Georg Brandl2012-02-201-1/+2
|\
| * Disable an inspect test: it depends on dict ordering which parameter is ↵Georg Brandl2012-02-201-1/+2
| | | | | | | | reported as duplicate.
* | Add part of test_inspect test from 2.7Antoine Pitrou2012-01-181-0/+11
|\ \ | |/
| * Add part of test_inspect test from 2.7Antoine Pitrou2012-01-181-0/+11
| |
* | MergeMichael Foord2011-12-221-0/+17
|\ \ | |/
| * Metaclasses with metaclasses with a __dict__ descriptor can no longer ↵Michael Foord2011-12-221-0/+17
| | | | | | | | | | | | trigger code execution with inspect.getattr_static. Closes issue 11829.
* | Issue #1785: Fix inspect and pydoc with misbehaving descriptors.Antoine Pitrou2011-12-211-0/+79
|\ \ | |/ | | | | Also fixes issue #13581: `help(type)` wouldn't display anything.
| * Issue #1785: Fix inspect and pydoc with misbehaving descriptors.Antoine Pitrou2011-12-211-0/+79
| | | | | | | | Also fixes issue #13581: `help(type)` wouldn't display anything.
* | Merge 3.2Michael Foord2011-12-181-0/+5
|\ \ | |/
| * Fix inspect.getattr_static to work on modules (again).Michael Foord2011-12-181-0/+5
| | | | | | | | Closes issue 11813.
* | #13012: use splitlines(keepends=True/False) instead of splitlines(0/1).Ezio Melotti2011-09-281-1/+1
|/
* allow "fake" filenames in findsource (closes #9284)Benjamin Peterson2011-06-111-0/+17
| | | | | | This allows findsource() to work in doctests. A patch from Dirkjan Ochtman.
* #11938: Fix duplicated test name in test_inspect. Patch by Andreas Stührk.Ezio Melotti2011-04-271-1/+1
|
* Correct handling of functions with only kwarg args in getcallargs (closes ↵Benjamin Peterson2011-03-281-0/+33
| | | | | | #11256) A patch from Daniel Urban.
* Closes issue 11133. Fixes two cases where inspect.getattr_static could ↵Michael Foord2011-03-151-0/+47
| | | | trigger code execution
* Issue4335: Added a test for inspect.getsourcelines with a module without EOL ↵Alexander Belopolsky2010-12-021-8/+29
| | | | at EOF.
* Reverted unintended change from r86916Alexander Belopolsky2010-12-011-7/+0
|
* Issue #4113: Added custom __repr__ method to functools.partial.Alexander Belopolsky2010-12-011-0/+7
|
* Issue 10220: switch to using string constants rather than integers for ↵Nick Coghlan2010-11-301-0/+8
| | | | inspect.getgeneratorstate() return values and make debugging friendly str() and repr() for generator states a requirement in the test suite
* Issue #10220: Add inspect.getgeneratorstate(). Initial patch by Rodolpho ↵Nick Coghlan2010-11-211-1/+46
| | | | Eckhardt
* #9424: Replace deprecated assert* methods in the Python test suite.Ezio Melotti2010-11-201-2/+2
|
* Issue 9732: __class__ no longer checked on objects by getattr_staticMichael Foord2010-11-201-1/+5
|
* Issue 9732: fetch the method resolution order from the type metaclass ↵Michael Foord2010-11-201-0/+16
| | | | directly in getattr_static
* Issue 9732: remove use of __class__ in inspect.getattr_static and note the ↵Michael Foord2010-11-201-0/+12
| | | | mro exception to code execution
* Issue 9732: addition of getattr_static to the inspect moduleMichael Foord2010-11-201-1/+151
|
* Don't use os.normcase when the result we are expecting is None.R. David Murray2010-06-171-1/+1
| | | | | This worked fine on linux but fails on Windows. That may or may not be a but in normcase.
* Merged revisions 82039 via svnmerge fromR. David Murray2010-06-171-0/+15
| | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r82039 | r.david.murray | 2010-06-16 21:36:52 -0400 (Wed, 16 Jun 2010) | 10 lines #8720: fix inspect regression by teaching getsourcefile about linecache. The fix for issue 4050 caused a regression: before that fix, source lines in the linecache would eventually be found by inspect. After the fix inspect reports an error earlier, and the source isn't found. The fix for the fix is to have getsourcefile look in the linecache for the file and return the psuedo-filename if the source is there, just as it already returns it if there is a PEP 302 loader. ........
* Merged revisions 79500 via svnmerge fromBenjamin Peterson2010-03-301-3/+177
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79500 | benjamin.peterson | 2010-03-30 12:58:13 -0500 (Tue, 30 Mar 2010) | 4 lines add inspect.getcallargs, which binds function arguments like a normal call #3135 Patch by George Sakkis ........
* Revert improper merge in test_inspect (r79251).Florent Xicluna2010-03-241-6/+6
|
* Merged revisions ↵Benjamin Peterson2010-03-211-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 77952,78030,78102,78104,78107,78206,78216,78296-78297,78328,78331-78332,78336,78339,78343,78378-78379,78415,78559,78717,78791 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77952 | mark.dickinson | 2010-02-03 10:50:14 -0600 (Wed, 03 Feb 2010) | 1 line Fix test_inspect.py data to match recent change to inspect_fodder.py (r77942). ........ r78030 | benjamin.peterson | 2010-02-06 14:14:10 -0600 (Sat, 06 Feb 2010) | 1 line check type_getattro for correctness in a descriptor corner case ........ r78102 | andrew.kuchling | 2010-02-07 19:35:35 -0600 (Sun, 07 Feb 2010) | 1 line Move distutils into its own subsection; add various items ........ r78104 | andrew.kuchling | 2010-02-08 07:22:24 -0600 (Mon, 08 Feb 2010) | 1 line Add two items; move a subsection ........ r78107 | antoine.pitrou | 2010-02-08 14:25:47 -0600 (Mon, 08 Feb 2010) | 3 lines Clarify and correct description for ccbench and iobench. ........ r78206 | r.david.murray | 2010-02-16 11:55:26 -0600 (Tue, 16 Feb 2010) | 3 lines Make the references to Popen in the description of Call and check_call into links. ........ r78216 | andrew.kuchling | 2010-02-18 08:16:48 -0600 (Thu, 18 Feb 2010) | 1 line Add various items ........ r78296 | andrew.kuchling | 2010-02-21 20:08:45 -0600 (Sun, 21 Feb 2010) | 1 line Re-word ........ r78297 | andrew.kuchling | 2010-02-21 20:29:10 -0600 (Sun, 21 Feb 2010) | 1 line #7076: mention SystemRandom class near start of the module docs; reword change description for clarity. Noted by Shawn Ligocki. ........ r78328 | jack.diederich | 2010-02-22 12:17:16 -0600 (Mon, 22 Feb 2010) | 1 line fixes issue #7530, serve_forever() ........ r78331 | andrew.kuchling | 2010-02-22 12:38:23 -0600 (Mon, 22 Feb 2010) | 1 line Fix comment typo ........ r78332 | andrew.kuchling | 2010-02-22 12:42:07 -0600 (Mon, 22 Feb 2010) | 2 lines #7627: MH.remove() would fail if the MH mailbox was locked; it would call _unlock_file() and pass it a closed file object. Noted by Rob Austein. ........ r78336 | jack.diederich | 2010-02-22 13:55:22 -0600 (Mon, 22 Feb 2010) | 1 line fixes issue #1522237, bad init check in _threading_local ........ r78339 | jack.diederich | 2010-02-22 15:27:38 -0600 (Mon, 22 Feb 2010) | 1 line * fix issue#7476 ........ r78343 | andrew.kuchling | 2010-02-22 16:48:41 -0600 (Mon, 22 Feb 2010) | 10 lines #2560: remove an unnecessary 'for' loop from my_fgets() in Parser/myreadline.c. Noted by Joseph Armbruster; patch by Jessica McKellar. The original code was 'for (;;) {...}', where ... ended with a 'return -2' statement and did not contain a 'break' or 'continue' statement. Therefore, the body of the loop is always executed once. Once upon a time there was a 'continue' in the loop, but it was removed in rev36346, committed by mwh on Wed Jul 7 17:44:12 2004. ........ r78378 | jack.diederich | 2010-02-23 11:23:30 -0600 (Tue, 23 Feb 2010) | 1 line fixup markup error ........ r78379 | jack.diederich | 2010-02-23 13:34:06 -0600 (Tue, 23 Feb 2010) | 1 line issue#6442 use in operator instead of has_key ........ r78415 | dirkjan.ochtman | 2010-02-23 22:00:52 -0600 (Tue, 23 Feb 2010) | 1 line Issue #7733: add explicit reference in asyncore docs. ........ r78559 | andrew.kuchling | 2010-03-01 13:45:21 -0600 (Mon, 01 Mar 2010) | 1 line #7637: update discussion of minidom.unlink() and garbage collection ........ r78717 | benjamin.peterson | 2010-03-05 21:13:33 -0600 (Fri, 05 Mar 2010) | 1 line settscdump is definitely an implementation detail ........ r78791 | andrew.kuchling | 2010-03-08 06:00:39 -0600 (Mon, 08 Mar 2010) | 1 line Add various items ........
* Merged revisions 78093 via svnmerge fromGeorg Brandl2010-03-141-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78093 | georg.brandl | 2010-02-07 18:03:15 +0100 (So, 07 Feb 2010) | 1 line Remove unused imports in test modules. ........
* Merged revisions 78351 via svnmerge fromR. David Murray2010-02-241-0/+2
| | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78351 | r.david.murray | 2010-02-22 19:24:49 -0500 (Mon, 22 Feb 2010) | 5 lines Issue 6292: for the moment at least, the test suite passes if run with -OO. Tests requiring docstrings are skipped. Patch by Brian Curtin, thanks to Matias Torchinsky for helping review and improve the patch. ........
* use assert[Not]In where appropriateEzio Melotti2010-01-231-2/+2
|
* use assert[Not]In where appropriateBenjamin Peterson2010-01-191-25/+25
| | | | A patch from Dave Malcolm.
* Merged revisions ↵Benjamin Peterson2009-11-131-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 75149,75260-75263,75265-75267,75292,75300,75376,75405,75429-75433,75437,75445,75501,75551,75572,75589-75591,75657,75742,75868,75952-75957,76057,76105,76139,76143,76162,76223 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75149 | gregory.p.smith | 2009-09-29 16:56:31 -0500 (Tue, 29 Sep 2009) | 3 lines Mention issue6972 in extractall docs about overwriting things outside of the supplied path. ........ r75260 | andrew.kuchling | 2009-10-05 16:24:20 -0500 (Mon, 05 Oct 2009) | 1 line Wording fix ........ r75261 | andrew.kuchling | 2009-10-05 16:24:35 -0500 (Mon, 05 Oct 2009) | 1 line Fix narkup ........ r75262 | andrew.kuchling | 2009-10-05 16:25:03 -0500 (Mon, 05 Oct 2009) | 1 line Document 'skip' parameter to constructor ........ r75263 | andrew.kuchling | 2009-10-05 16:25:35 -0500 (Mon, 05 Oct 2009) | 1 line Note side benefit of socket.create_connection() ........ r75265 | andrew.kuchling | 2009-10-05 17:31:11 -0500 (Mon, 05 Oct 2009) | 1 line Reword sentence ........ r75266 | andrew.kuchling | 2009-10-05 17:32:48 -0500 (Mon, 05 Oct 2009) | 1 line Use standard comma punctuation; reword some sentences in the docs ........ r75267 | andrew.kuchling | 2009-10-05 17:42:56 -0500 (Mon, 05 Oct 2009) | 1 line Backport r73983: Document the thousands separator. ........ r75292 | benjamin.peterson | 2009-10-08 22:11:36 -0500 (Thu, 08 Oct 2009) | 1 line death to old CVS keyword ........ r75300 | benjamin.peterson | 2009-10-09 16:48:14 -0500 (Fri, 09 Oct 2009) | 1 line fix some coding style ........ r75376 | benjamin.peterson | 2009-10-11 20:26:07 -0500 (Sun, 11 Oct 2009) | 1 line platform we don't care about ........ r75405 | neil.schemenauer | 2009-10-14 12:17:14 -0500 (Wed, 14 Oct 2009) | 4 lines Issue #1754094: Improve the stack depth calculation in the compiler. There should be no other effect than a small decrease in memory use. Patch by Christopher Tur Lesniewski-Laas. ........ r75429 | benjamin.peterson | 2009-10-14 20:47:28 -0500 (Wed, 14 Oct 2009) | 1 line pep8ify if blocks ........ r75430 | benjamin.peterson | 2009-10-14 20:49:37 -0500 (Wed, 14 Oct 2009) | 1 line use floor division and add a test that exercises the tabsize codepath ........ r75431 | benjamin.peterson | 2009-10-14 20:56:25 -0500 (Wed, 14 Oct 2009) | 1 line change test to what I intended ........ r75432 | benjamin.peterson | 2009-10-14 22:05:39 -0500 (Wed, 14 Oct 2009) | 1 line some cleanups ........ r75433 | benjamin.peterson | 2009-10-14 22:06:55 -0500 (Wed, 14 Oct 2009) | 1 line make inspect.isabstract() always return a boolean; add a test for it, too #7069 ........ r75437 | benjamin.peterson | 2009-10-15 10:44:46 -0500 (Thu, 15 Oct 2009) | 1 line only clear a module's __dict__ if the module is the only one with a reference to it #7140 ........ r75445 | vinay.sajip | 2009-10-16 09:06:44 -0500 (Fri, 16 Oct 2009) | 1 line Issue #7120: logging: Removed import of multiprocessing which is causing crash in GAE. ........ r75501 | antoine.pitrou | 2009-10-18 13:37:11 -0500 (Sun, 18 Oct 2009) | 3 lines Add a comment about unreachable code, and fix a typo ........ r75551 | benjamin.peterson | 2009-10-19 22:14:10 -0500 (Mon, 19 Oct 2009) | 1 line use property api ........ r75572 | benjamin.peterson | 2009-10-20 16:55:17 -0500 (Tue, 20 Oct 2009) | 1 line clarify buffer arg #7178 ........ r75589 | benjamin.peterson | 2009-10-21 21:26:47 -0500 (Wed, 21 Oct 2009) | 1 line whitespace ........ r75590 | benjamin.peterson | 2009-10-21 21:36:47 -0500 (Wed, 21 Oct 2009) | 1 line rewrite to be nice to other implementations ........ r75591 | benjamin.peterson | 2009-10-21 21:50:38 -0500 (Wed, 21 Oct 2009) | 4 lines rewrite for style, clarify, and comments Also, use the hasattr() like scheme of allowing BaseException exceptions through. ........ r75657 | antoine.pitrou | 2009-10-24 07:41:27 -0500 (Sat, 24 Oct 2009) | 3 lines Fix compilation error in debug mode. ........ r75742 | benjamin.peterson | 2009-10-26 17:51:16 -0500 (Mon, 26 Oct 2009) | 1 line use 'is' instead of id() ........ r75868 | benjamin.peterson | 2009-10-27 15:59:18 -0500 (Tue, 27 Oct 2009) | 1 line test expect base classes ........ r75952 | georg.brandl | 2009-10-29 15:38:32 -0500 (Thu, 29 Oct 2009) | 1 line Use the correct function name in docstring. ........ r75953 | georg.brandl | 2009-10-29 15:39:50 -0500 (Thu, 29 Oct 2009) | 1 line Remove mention of the old -X command line switch. ........ r75954 | georg.brandl | 2009-10-29 15:53:00 -0500 (Thu, 29 Oct 2009) | 1 line Use constants instead of magic integers for test result. Do not re-run with --verbose3 for environment changing tests. ........ r75955 | georg.brandl | 2009-10-29 15:54:03 -0500 (Thu, 29 Oct 2009) | 1 line Use a single style for all the docstrings in the math module. ........ r75956 | georg.brandl | 2009-10-29 16:16:34 -0500 (Thu, 29 Oct 2009) | 1 line I do not think the "railroad" program mentioned is still available. ........ r75957 | georg.brandl | 2009-10-29 16:44:56 -0500 (Thu, 29 Oct 2009) | 1 line Fix constant name. ........ r76057 | benjamin.peterson | 2009-11-02 09:06:45 -0600 (Mon, 02 Nov 2009) | 1 line prevent a rather unlikely segfault ........ r76105 | georg.brandl | 2009-11-04 01:38:12 -0600 (Wed, 04 Nov 2009) | 1 line #7259: show correct equivalent for operator.i* operations in docstring; fix minor issues in operator docs. ........ r76139 | benjamin.peterson | 2009-11-06 19:04:38 -0600 (Fri, 06 Nov 2009) | 1 line spelling ........ r76143 | georg.brandl | 2009-11-07 02:26:07 -0600 (Sat, 07 Nov 2009) | 1 line #7271: fix typo. ........ r76162 | benjamin.peterson | 2009-11-08 22:10:53 -0600 (Sun, 08 Nov 2009) | 1 line discuss how to use -p ........ r76223 | georg.brandl | 2009-11-12 02:29:46 -0600 (Thu, 12 Nov 2009) | 1 line Give the profile module a module directive. ........
* convert old fail* assertions to assert*Benjamin Peterson2009-06-301-33/+33
|
* Merged revisions 72979 via svnmerge fromPhilip Jenvey2009-05-281-1/+2
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72979 | philip.jenvey | 2009-05-27 22:58:44 -0700 (Wed, 27 May 2009) | 2 lines explicitly close files ........
* Merged revisions 72630 via svnmerge fromR. David Murray2009-05-141-3/+7
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72630 | r.david.murray | 2009-05-14 12:12:57 -0400 (Thu, 14 May 2009) | 3 lines Fix test failure on Windows, and add skip check if even unicodedata turns out not to be an external module on some other platform. ........
* This fix makes, eg, 'pydoc time' work again.R. David Murray2009-05-131-0/+7
| | | | | | | | | | | | Merged revisions 72605 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r72605 | r.david.murray | 2009-05-13 13:14:11 -0400 (Wed, 13 May 2009) | 3 lines Issue #4050: inspect.findsource/getsource now raise an IOError if the 'source' file is a binary. Patch by Brodie Rao, test by Daniel Diniz. ........
* Merged revisions 68676 via svnmerge fromBenjamin Peterson2009-01-171-1/+9
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r68676 | benjamin.peterson | 2009-01-17 16:27:54 -0600 (Sat, 17 Jan 2009) | 1 line fix inspect.isclass() on instances with a custom __getattr__ #1225107 ........