summaryrefslogtreecommitdiffstats
path: root/Lib/test/script_helper.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #9517: Move script_helper to the support package.Berker Peksag2015-05-061-244/+0
| | | | Patch by Christie Wilson.
* Issue #23943: Fix typos. Patch by Piotr Kasprzyk.Berker Peksag2015-04-141-1/+1
|\
| * Issue #23943: Fix typos. Patch by Piotr Kasprzyk.Berker Peksag2015-04-141-1/+1
| |
* | Issue #23309: Avoid a deadlock at shutdown if a daemon thread is abortedAntoine Pitrou2015-04-131-4/+14
|\ \ | |/ | | | | | | | | while it is holding a lock to a buffered I/O object, and the main thread tries to use the same I/O object (typically stdout or stderr). A fatal error is emitted instead.
| * Issue #23309: Avoid a deadlock at shutdown if a daemon thread is abortedAntoine Pitrou2015-04-131-5/+14
| | | | | | | | | | | | while it is holding a lock to a buffered I/O object, and the main thread tries to use the same I/O object (typically stdout or stderr). A fatal error is emitted instead.
* | Issue #23715: Enhance test.script_helper to investigate test_eintr failureVictor Stinner2015-03-201-4/+23
| | | | | | | | If Python failed, show also stdout in the assertion error.
* | Make the stdlib test suite helper test.script_helper._assert_python no longerGregory P. Smith2015-02-051-2/+3
|\ \ | |/ | | | | | | pass -I or -E to the child process by default when the environment is required for the child process interpreter to function properly.
| * Make the stdlib test suite helper test.script_helper._assert_python no longerGregory P. Smith2015-02-051-2/+3
| | | | | | | | | | pass -I or -E to the child process by default when the environment is required for the child process interpreter to function properly.
* | Skip some tests that require a subinterpreter launched with -E or -I when theGregory P. Smith2015-02-041-0/+35
|\ \ | |/ | | | | | | | | | | | | interpreter under test is being run in an environment that requires the use of environment variables such as PYTHONHOME in order to function at all. Adds a test.script_helper.interpreter_requires_environment() function to be used with @unittest.skipIf on stdlib test methods requiring this.
| * Skip some tests that require a subinterpreter launched with -E or -I when theGregory P. Smith2015-02-041-0/+35
|/ | | | | | | | interpreter under test is being run in an environment that requires the use of environment variables such as PYTHONHOME in order to function at all. Adds a private test.script_helper._interpreter_requires_environment() function to be used with @unittest.skipIf on stdlib test methods requiring this.
* Add the command line to the AssertionError raised by test.script_helper'sGregory P. Smith2015-01-211-2/+3
| | | | | | | Python subprocess failure assertion error messages for easier debugging. Adds a unittest for test.script_helper to confirm that this code works as it is otherwise uncovered by an already passing test suite that uses it. :)
* Issue #21770: Call function instead of module. Patch by Claudiu Popa.Terry Jan Reedy2014-06-201-2/+2
|
* Try to fix issue #21425 workaround for shared library buildsAntoine Pitrou2014-05-111-2/+2
|
* Try workaround for test issues in #21425Antoine Pitrou2014-05-111-0/+8
|
* Issue #21425: Fix flushing of standard streams in the interactive interpreter.Antoine Pitrou2014-05-111-2/+2
|
* Issue #19700: set __spec__ appropriately in runpyNick Coghlan2013-12-151-2/+4
| | | | | | | | Note that __spec__.name is not currently guaranteed to be in sys.modules when the code is running, only __name__ is. The "running module is in sys.modules" invariant will be expanded to also cover __spec__.name in a subsequent patch.
* Close #18754: Run Python child processes in isolated more in the test suite.Victor Stinner2013-10-121-1/+17
|
* Add some docstrings, clarify others, and fix formatting.Eli Bendersky2013-08-111-3/+11
|
* Merge #15415 from 3.3Nick Coghlan2013-07-281-11/+1
|\
| * Close #15415: Factor out temp dir helpers to test.supportNick Coghlan2013-07-281-11/+1
| | | | | | | | Patch by Chris Jerdonek
* | Issue #17206: test.regrtest and test.script_helper enable faulthandler moduleVictor Stinner2013-06-251-1/+1
| | | | | | | | in subprocesses.
* | Issue #17177: Stop using imp in a bunch of testsBrett Cannon2013-06-151-1/+1
|/
* Invalidate finder caches after creating a new script.Brett Cannon2012-04-271-0/+2
|
* Merge 3.2: Issue #13703 plus some related test suite fixes.Georg Brandl2012-02-201-2/+5
|\
| * Merge from 3.1: Issue #13703: add a way to randomize the hash values of ↵Georg Brandl2012-02-201-2/+5
| |\ | | | | | | | | | | | | | | | | | | | | | | | | basic types (str, bytes, datetime) in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated. The environment variable PYTHONHASHSEED and the new command line flag -R control this behavior.
| | * Issue #13703: add a way to randomize the hash values of basic types (str, ↵Georg Brandl2012-02-201-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | bytes, datetime) in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated. The environment variable PYTHONHASHSEED and the new command line flag -R control this behavior.
| | * Merged revisions 87136,87221,87256,87337-87338,87571,87839,88164 via ↵R. David Murray2011-02-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87136 | r.david.murray | 2010-12-08 17:53:00 -0500 (Wed, 08 Dec 2010) | 6 lines Have script_helper._assert_python strip refcount strings from stderr. This makes the output of the function and those that depend on it independent of whether or not they are being run under a debug build. ........ r87221 | r.david.murray | 2010-12-13 19:55:46 -0500 (Mon, 13 Dec 2010) | 4 lines #10699: fix docstring for tzset: it does not take a parameter Thanks to Garrett Cooper for the fix. ........ r87256 | r.david.murray | 2010-12-14 21:19:14 -0500 (Tue, 14 Dec 2010) | 2 lines #10705: document what the values of debuglevel are and mean. ........ r87337 | r.david.murray | 2010-12-17 11:11:40 -0500 (Fri, 17 Dec 2010) | 2 lines #10559: provide instructions for accessing sys.argv when first mentioned. ........ r87338 | r.david.murray | 2010-12-17 11:29:07 -0500 (Fri, 17 Dec 2010) | 2 lines #10454: clarify the compileall docs and help messages. [compileall.py changes not backported.] ........ r87571 | r.david.murray | 2010-12-29 14:06:48 -0500 (Wed, 29 Dec 2010) | 2 lines Fix same typo in docs. ........ r87839 | r.david.murray | 2011-01-07 16:57:25 -0500 (Fri, 07 Jan 2011) | 9 lines Fix formatting of values with embedded newlines when rfc2047 encoding Before this patch if a value being encoded had an embedded newline, the line following the newline would have no leading whitespace, and the whitespace it did have was encoded into the word. Now the existing whitespace gets turned into a blank, the way it does in other header reformatting, and the _continuation_ws gets added at the beginning of the encoded line. ........ r88164 | r.david.murray | 2011-01-24 14:34:58 -0500 (Mon, 24 Jan 2011) | 12 lines #10960: fix 'stat' links, link to lstat from stat, general tidy of stat doc. Original patch by Michal Nowikowski, with some additions and wording fixes by me. I changed the wording from 'Performs a stat system call' to 'Performs the equivalent of a stat system call', since on Windows there are no stat/lstat system calls involved. I also extended Michal's breakout of the attributes into a list to the other paragraphs, and rearranged the order of the paragraphs in the 'stat' docs to make it flow better and put it in what I think is a more logical/useful order. ........
| | * I'm only backporting the tests (which run fine), as well asAntoine Pitrou2010-11-101-0/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | a shortened version of Lib/test/script_helper.py. Merged revisions 86395 via svnmerge from svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86395 | antoine.pitrou | 2010-11-10 14:55:25 +0100 (mer., 10 nov. 2010) | 4 lines Issue #10372: Import the warnings module only after the IO library is initialized, so as to avoid bootstrap issues with the '-W' option. ........
* | Issue #11393: Add the new faulthandler moduleVictor Stinner2011-03-301-2/+3
|/
* Have script_helper._assert_python strip refcount strings from stderr.R. David Murray2010-12-081-1/+3
| | | | | | This makes the output of the function and those that depend on it independent of whether or not they are being run under a debug build.
* Preserve the original environment (e.g. LD_LIBRARY_PATH)Antoine Pitrou2010-11-091-4/+5
|
* Use script_helper in one more testAntoine Pitrou2010-11-091-7/+21
|
* Close subprocess pipes to clear ResourceWarning messages in debug mode.Brian Curtin2010-11-011-0/+2
|
* Better Python spawning primitives in test.script_helper, forAntoine Pitrou2010-10-081-12/+19
| | | | easier writing of unit tests and better error reporting.
* Issue #8202: Set sys.argv[0] to -m rather than -c while searching for the ↵Nick Coghlan2010-08-171-2/+2
| | | | module to execute. Also updates all the cmd_line_script tests to validate the setting of sys.path[0] and the current working directory
* Syntax cleanup.Florent Xicluna2010-07-281-2/+2
|
* PEP 3147Barry Warsaw2010-04-171-11/+12
|
* Use UTF-8 encoding to create Python test scripts.Florent Xicluna2010-02-271-1/+2
|
* Merged revisions 76716 via svnmerge fromAntoine Pitrou2009-12-081-1/+2
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76716 | antoine.pitrou | 2009-12-08 20:25:51 +0100 (mar., 08 déc. 2009) | 4 lines Fix the transient refleaks in test_zipimport_support. Diagnosis and original patch by Florent Xicluna (flox). ........
* Merged revisions ↵Nick Coghlan2009-11-161-0/+119
76286-76287,76289-76294,76296-76299,76301-76305,76307,76310-76311,76313-76322 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r76286 | nick.coghlan | 2009-11-15 17:30:34 +1000 (Sun, 15 Nov 2009) | 1 line Issue #6816: expose the zipfile and directory execution mechanism to Python code via the runpy module. Also consolidated some script execution functionality in the test harness into a helper module and removed some implementation details from the runpy module documentation. ........ r76321 | nick.coghlan | 2009-11-16 13:55:51 +1000 (Mon, 16 Nov 2009) | 1 line Account for another cache when hunting ref leaks ........ r76322 | nick.coghlan | 2009-11-16 13:57:32 +1000 (Mon, 16 Nov 2009) | 1 line Allow for backslashes in file paths passed to the regex engine ........