summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_trace.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.12] gh-68403: Fix test_coverage in test_trace (GH-108910) (#109104)Miss Islington (bot)2023-09-081-3/+8
| | | | | | | | gh-68403: Fix test_coverage in test_trace (GH-108910) Its behavior no longer affected by test running options such as -m. (cherry picked from commit 7e1a7abb9831965cdec477e62dbe4f8415b8a582) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-108416: Mark slow test methods with @requires_resource('cpu') ↵Miss Islington (bot)2023-09-021-1/+2
| | | | | | | | | | | | (GH-108421) (#108798) gh-108416: Mark slow test methods with @requires_resource('cpu') (GH-108421) Only mark tests which spend significant system or user time, by itself or in subprocesses. (cherry picked from commit f3ba0a74cd50274acdcd592d4ce8395b92492b7c) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-97933: (PEP 709) inline list/dict/set comprehensions (#101441)Carl Meyer2023-05-091-3/+1
| | | | Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-51524: Fix bug when calling trace.CoverageResults with valid infile (#99629)Furkan Onder2022-11-281-0/+10
| | | | Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-37971: fix the position of decorator application (GH-30027)Carl Friedrich Bolz-Tereick2021-12-101-3/+3
| | | | | | | The line numbers of actually calling the decorator functions of functions and classes was wrong (as opposed to loading them, were they have been correct previously too). Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-45890: Add tests for tracing try-except-finally blocks (GH-29746)Irit Katriel2021-12-071-0/+5
|
* bpo-45020: Freeze some of the modules imported during startup. (gh-28335)Eric Snow2021-09-151-1/+1
| | | | | | | Doing this provides significant performance gains for runtime startup (~15% with all the imported modules frozen). We don't yet freeze all the imported modules because there are a few hiccups in the build systems we need to sort out first. (See bpo-45186 and bpo-45188.) Note that in PR GH-28320 we added a command-line flag (-X frozen_modules=[on|off]) that allows users to opt out of (or into) using frozen modules. The default is still "off" but we will change it to "on" as soon as we can do it in a way that does not cause contributors pain. https://bugs.python.org/issue45020
* bpo-40275: Use new test.support helper submodules in tests (GH-21449)Hai Shi2020-08-031-1/+2
|
* bpo-41138: Fix trace CLI for non-UTF-8 files. (GH-21177)Serhiy Storchaka2020-06-281-13/+21
| | | | Fix also a resource warning when store counts and module info.
* bpo-41069: Make TESTFN and the CWD for tests containing non-ascii ↵Serhiy Storchaka2020-06-251-3/+6
| | | | characters. (GH-21035)
* Fix typos in comments, docs and test names (#15018)Min ho Kim2019-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * Fix typos in comments, docs and test names * Update test_pyparse.py account for change in string length * Apply suggestion: splitable -> splittable Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu> * Apply suggestion: splitable -> splittable Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu> * Apply suggestion: Dealloccte -> Deallocate Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu> * Update posixmodule checksum. * Reverse idlelib changes.
* [3.9] bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-12620)Serhiy Storchaka2019-06-051-3/+2
| | | Turn deprecation warnings added in 3.8 into TypeError.
* Add option to trace to run modules (GH-5134)Mario Corchero2019-06-011-1/+6
| | | | | Adds a new option in trace that allows tracing runnable modules. It is exposed as `--module module_name` as `-m` is already in use for another argument.
* bpo-36492: Deprecate passing some arguments as keyword arguments. (GH-12637)Serhiy Storchaka2019-04-011-0/+12
| | | | | | | | | | | | | | | | | | | | | | Deprecated passing the following arguments as keyword arguments: - "func" in functools.partialmethod(), weakref.finalize(), profile.Profile.runcall(), cProfile.Profile.runcall(), bdb.Bdb.runcall(), trace.Trace.runfunc() and curses.wrapper(). - "function" in unittest.addModuleCleanup() and unittest.TestCase.addCleanup(). - "fn" in the submit() method of concurrent.futures.ThreadPoolExecutor and concurrent.futures.ProcessPoolExecutor. - "callback" in contextlib.ExitStack.callback(), contextlib.AsyncExitStack.callback() and contextlib.AsyncExitStack.push_async_callback(). - "c" and "typeid" in the create() method of multiprocessing.managers.Server and multiprocessing.managers.SharedMemoryServer. - "obj" in weakref.finalize(). Also allowed to pass arbitrary keyword arguments (even "self" and "func") if the above arguments are passed as positional argument.
* bpo-34876: Change the lineno of the AST for decorated function and class. ↵Serhiy Storchaka2018-10-301-0/+44
| | | | | | | (GH-9731) It was overridden by the lineno of the first decorator. Now it is the lineno of 'def' or 'class'.
* bpo-34171: Fix test_trace. (GH-8940)Serhiy Storchaka2018-08-271-3/+6
| | | | Remove "trace.cover" left from previous test runs before testing that it is no longer created.
* bpo-34171: Prevent creating Lib/trace.cover when run the trace module. (GH-8841)Serhiy Storchaka2018-08-251-0/+5
|
* bpo-26818: Add a test to make sure the bug is fixed (GH-8664)Berker Peksag2018-08-111-0/+22
| | | | The main cause of this bug was fixed as part of bpo-31908.
* bpo-31908: Fix output of cover files for trace module command-line tool. ↵Michael Selik2018-05-011-0/+41
| | | | | | (GH-4205) Previously emitted cover files only when --missing option was used.
* bpo-32852: Fix trace changing sys.argv to tuple. (GH-5692)Kyle Altendorf2018-02-171-0/+10
|
* Issue #19398: Extra slash no longer added to sys.path components in case ofSerhiy Storchaka2016-11-111-4/+4
|\ | | | | | | | | empty compile-time PYTHONPATH components. This fixes some tests in -S or -I modes.
| * Issue #19398: Extra slash no longer added to sys.path components in case ofSerhiy Storchaka2016-11-111-4/+4
| | | | | | | | | | empty compile-time PYTHONPATH components. This fixes some tests in -S or -I modes.
* | Issue22642 - Convert trace module's option handling mechanism from getopt to ↵Senthil Kumaran2016-01-131-0/+22
| | | | | | | | | | | | argparse. Patch contributed by SilentGhost.
* | Issue #26069: Remove the deprecated apis in the trace module.Senthil Kumaran2016-01-111-47/+1
|/
* Issue 24215: Added tests for more builtin types in test_pprint.Serhiy Storchaka2015-05-201-8/+4
|\ | | | | | | Made test_pprint and test_trace discoverable.
| * Issue 24215: Added tests for more builtin types in test_pprint.Serhiy Storchaka2015-05-201-8/+4
| | | | | | | | Made test_pprint and test_trace discoverable.
* | Issue #23731: Implement PEP 488.Brett Cannon2015-04-131-2/+2
| | | | | | | | | | | | The concept of .pyo files no longer exists. Now .pyc files have an optional `opt-` tag which specifies if any extra optimizations beyond the peepholer were applied.
* | Fixes #10541: regrtest -T is brokenAlexander Belopolsky2014-06-291-1/+5
|/ | | | | | * makes test_trace tests restore the tracefunc after they run * write_results() in trace module will not terminate if lnotab cannot be found.
* #17143: fix buildbot failures on Windows.Ezio Melotti2013-02-201-5/+6
|
* #17143: fix a missing import in the trace module. Initial patch by Berker ↵Ezio Melotti2013-02-151-0/+45
| | | | Peksag.
* Implemented PEP 405 (Python virtual environments).Vinay Sajip2012-05-261-2/+2
|
* Issue #2377: Make importlib the implementation of __import__().Brett Cannon2012-04-141-1/+1
| | | | | | | importlib._bootstrap is now frozen into Python/importlib.h and stored as _frozen_importlib in sys.modules. Py_Initialize() loads the frozen code along with sys and imp and then uses _frozen_importlib._install() to set builtins.__import__() w/ _frozen_importlib.__import__().
* #11565: Merge with 3.2.Ezio Melotti2011-03-161-1/+1
|\
| * #11565: Merge with 3.1.Ezio Melotti2011-03-161-1/+1
| |\
| | * #11565: Fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-161-1/+1
| | |
| | * Merged revisions 86596 via svnmerge fromEzio Melotti2010-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #9424: Replace deprecated assert* methods in the Python test suite. ........
| | * Merged revisions 85000 via svnmerge fromAlexander Belopolsky2010-09-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85000 | alexander.belopolsky | 2010-09-24 18:04:22 -0400 (Fri, 24 Sep 2010) | 1 line This should fix buildbot failure introduced by r84994 ........
| | * Merged revisions 84994 via svnmerge fromAlexander Belopolsky2010-09-241-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84994 | alexander.belopolsky | 2010-09-24 14:03:12 -0400 (Fri, 24 Sep 2010) | 1 line Issue #9936: Fixed executable lines' search in the trace module. ........
| | * Issue 9315: Removed list comprehention test.Alexander Belopolsky2010-09-161-22/+0
| | |
| | * Merged revisions 84780-84781 via svnmerge fromAlexander Belopolsky2010-09-131-0/+322
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k with some manual fixes ........ r84780 | alexander.belopolsky | 2010-09-13 14:14:34 -0400 (Mon, 13 Sep 2010) | 3 lines Issue #9315: Fix for the trace module to record correct class name when tracing methods. Unit tests. Patch by Eli Bendersky. ........ r84781 | alexander.belopolsky | 2010-09-13 14:15:33 -0400 (Mon, 13 Sep 2010) | 1 line Removed debugging setting ........
| | * Merged revisions 83140-83141 via svnmerge fromAlexander Belopolsky2010-07-251-790/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83140 | alexander.belopolsky | 2010-07-25 11:02:55 -0400 (Sun, 25 Jul 2010) | 5 lines Issue #9315: Renamed test_trace to test_sys_settrace and test_profilehooks to test_sys_setprofile so that test_trace can be used for testing the trace module and for naming consistency. ........ r83141 | alexander.belopolsky | 2010-07-25 11:05:42 -0400 (Sun, 25 Jul 2010) | 1 line Corrected comments on where settrace and setprofile are tested. ........
| | * Reverted r83143: svnmerge failed to add new namesAlexander Belopolsky2010-07-251-0/+790
| | |
| | * Merged revisions 83140-83141 via svnmerge fromAlexander Belopolsky2010-07-251-790/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83140 | alexander.belopolsky | 2010-07-25 11:02:55 -0400 (Sun, 25 Jul 2010) | 5 lines Issue #9315: Renamed test_trace to test_sys_settrace and test_profilehooks to test_sys_setprofile so that test_trace can be used for testing the trace module and for naming consistency. ........ r83141 | alexander.belopolsky | 2010-07-25 11:05:42 -0400 (Sun, 25 Jul 2010) | 1 line Corrected comments on where settrace and setprofile are tested. ........
* | | Issue #10992: make tests pass when run under coverage.Brett Cannon2011-02-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various tests fail when run under coverage. A primary culprit is refcount tests which fail as the counts are thrown off by the coverage code. A new decorator -- test.support.refcount_test -- is used to decorate tests which test refcounts and to skip them when running under coverage. Other tests simply fail because of changes in the system (e.g., __local__ suddenly appearing). Thanks to Kristian Vlaardingerbroek for helping to diagnose the test failures.
* | | Issue #10990: Prevent tests from clobbering a set trace function.Brett Cannon2011-02-211-0/+7
|/ / | | | | | | | | | | | | | | | | | | | | Many tests simply didn't care if they unset a pre-existing trace function. This made test coverage impossible. This patch fixes various tests to put back any pre-existing trace function. It also introduces test.support.no_tracing as a decorator which will temporarily unset the trace function for tests which simply fail otherwise. Thanks to Kristian Vlaardingerbroek for helping to find the cause of various trace function unsets.
* | Fixed deprecation warnings.Alexander Belopolsky2010-11-261-2/+2
| |
* | #9424: Replace deprecated assert* methods in the Python test suite.Ezio Melotti2010-11-201-1/+1
| |
* | Fixed unit test failure on WindowsAlexander Belopolsky2010-11-081-4/+5
| |
* | Streamlined code in trace.Ignore and added unit tests.Alexander Belopolsky2010-11-081-0/+14
| |
* | This should fix buildbot failure introduced by r84994Alexander Belopolsky2010-09-241-0/+2
| |