summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_cmd_line.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge debug print removal with 3.2.Ezio Melotti2012-11-231-4/+0
|\
| * Remove debug print.Ezio Melotti2012-11-231-4/+0
| |
* | #16306: merge with 3.2.Ezio Melotti2012-11-231-3/+15
|\ \ | |/
| * #16306: report only the first unknown option and add more tests. Patch by ↵Ezio Melotti2012-11-231-3/+15
| | | | | | | | Serhiy Storchaka.
* | #16306: merge with 3.2.Ezio Melotti2012-11-181-1/+8
|\ \ | |/
| * #16306: Fix multiple error messages when unknown command line parameters ↵Ezio Melotti2012-11-181-1/+8
| | | | | | | | where passed to the interpreter. Patch by Hieu Nguyen.
* | Issue #16218, #16444: Backport improvment on tests for non-ASCII charactersVictor Stinner2012-11-121-3/+3
| |
* | Issue #15001: fix segfault on "del sys.module['__main__']"Hynek Schlawack2012-11-071-0/+12
|\ \ | |/ | | | | Patch by Victor Stinner.
| * Issue #15001: fix segfault on "del sys.module['__main__']"Hynek Schlawack2012-11-071-0/+12
| | | | | | | | Patch by Victor Stinner.
| * Close #13119: use "\r\n" newline for sys.stdout/err on WindowsVictor Stinner2012-08-031-0/+17
| | | | | | | | sys.stdout and sys.stderr are now using "\r\n" newline on Windows, as Python 2.
* | Close #13119: use "\r\n" newline for sys.stdout/err on WindowsVictor Stinner2012-08-031-0/+17
| | | | | | | | sys.stdout and sys.stderr are now using "\r\n" newline on Windows, as Python 2.
* | enable hash randomization by defaultBenjamin Peterson2012-02-211-2/+2
| |
* | Merge 3.2: Issue #13703 plus some related test suite fixes.Georg Brandl2012-02-201-0/+16
|\ \ | |/
| * Merge from 3.1: Issue #13703: add a way to randomize the hash values of ↵Georg Brandl2012-02-201-0/+16
| |\ | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 86081 via svnmerge fromBrian Curtin2010-11-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86081 | brian.curtin | 2010-11-01 09:00:33 -0500 (Mon, 01 Nov 2010) | 2 lines Close subprocess pipes to clear ResourceWarning messages in debug mode. ........
| | * Merged revisions 80116 via svnmerge fromVictor Stinner2010-04-161-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r80116 | victor.stinner | 2010-04-16 17:10:27 +0200 (ven., 16 avril 2010) | 2 lines Issue #7605: Fix test_cmd_line if the current working directory is not ASCII ........
| | * Merged revisions 73715 via svnmerge fromGeorg Brandl2009-08-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://svn.python.org/python/branches/py3k ........ r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line convert old fail* assertions to assert* ........
* | | Issue #7111: Python can now be run without a stdin, stdout or stderr stream.Antoine Pitrou2011-11-281-0/+39
|\ \ \ | |/ / | | | | | | | | | It was already the case with Python 2. However, the corresponding sys module entries are now set to None (instead of an unusable file object).
| * | Issue #7111: Python can now be run without a stdin, stdout or stderr stream.Antoine Pitrou2011-11-281-0/+39
| | | | | | | | | | | | | | | It was already the case with Python 2. However, the corresponding sys module entries are now set to None (instead of an unusable file object).
* | | Issue #13444: When stdout has been closed explicitly, we should not attempt ↵Antoine Pitrou2011-11-261-0/+19
|\ \ \ | |/ / | | | | | | | | | | | | to flush it at shutdown and print an error. This also adds a test for issue #5319, whose resolution introduced the issue.
| * | Issue #13444: When stdout has been closed explicitly, we should not attempt ↵Antoine Pitrou2011-11-261-0/+19
| | | | | | | | | | | | | | | | | | to flush it at shutdown and print an error. This also adds a test for issue #5319, whose resolution introduced the issue.
* | | Merge #10206: add test for previously fixed bug.R David Murray2011-06-241-0/+7
|\ \ \ | |/ /
| * | #10206: add test for previously fixed bug.R David Murray2011-06-241-0/+7
| | | | | | | | | | | | Patch by Francisco Martín Brugué.
| * | Merged revisions 88530 via svnmerge fromVictor Stinner2011-02-231-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88530 | victor.stinner | 2011-02-23 13:07:37 +0100 (mer., 23 févr. 2011) | 4 lines Issue #11272: Fix input() and sys.stdin for Windows newline On Windows, input() strips '\r' (and not only '\n'), and sys.stdin uses universal newline (replace '\r\n' by '\n'). ........
* | | Remove traces of division_warning left over from Python 2 (#10998)Éric Araujo2011-03-261-6/+0
| | |
* | | Normalize the encoding names for Latin-1 and UTF-8 toMarc-André Lemburg2011-02-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'latin-1' and 'utf-8'. These are optimized in the Python Unicode implementation to result in more direct processing, bypassing the codec registry. Also see issue11303.
* | | Issue #11272: Fix input() and sys.stdin for Windows newlineVictor Stinner2011-02-231-0/+26
|/ / | | | | | | | | On Windows, input() strips '\r' (and not only '\n'), and sys.stdin uses universal newline (replace '\r\n' by '\n').
* | Issue #10601: sys.displayhook uses 'backslashreplace' error handler onVictor Stinner2010-12-041-0/+18
| | | | | | | | UnicodeEncodeError.
* | Use script_helper in one more testAntoine Pitrou2010-11-091-28/+14
| |
* | Close subprocess pipes to clear ResourceWarning messages in debug mode.Brian Curtin2010-11-011-0/+1
| |
* | Issue #10089: Add support for arbitrary -X options on the command-line.Antoine Pitrou2010-10-211-0/+9
| | | | | | | | They can be retrieved through a new attribute `sys._xoptions`.
* | Issue #4388: On Mac OS X, decode command line arguments from UTF-8, instead ofVictor Stinner2010-10-201-0/+32
| | | | | | | | | | | | | | the locale encoding. If the LANG (and LC_ALL and LC_CTYPE) environment variable is not set, the locale encoding is ISO-8859-1, whereas most programs (including Python) expect UTF-8. Python already uses UTF-8 for the filesystem encoding and to encode command line arguments on this OS.
* | Move non-ascii test from test_run_code() to a new function: test_non_ascii()Victor Stinner2010-10-201-7/+9
| |
* | Move test_undecodable_code() from test_sys to test_cmd_lineVictor Stinner2010-10-201-0/+38
| |
* | Add some debug output in verbose modeAntoine Pitrou2010-10-081-0/+4
| |
* | Better Python spawning primitives in test.script_helper, forAntoine Pitrou2010-10-081-49/+27
| | | | | | | | 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-5/+1
| | | | | | | | module to execute. Also updates all the cmd_line_script tests to validate the setting of sys.path[0] and the current working directory
* | Issue #7605: Fix test_cmd_line if the current working directory is not ASCIIVictor Stinner2010-04-161-2/+9
| |
* | Merged revisions 78093 via svnmerge fromGeorg Brandl2010-03-141-1/+0
| | | | | | | | | | | | | | | | | | | | 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. ........
* | use assert[Not]In where appropriateBenjamin Peterson2010-01-191-6/+6
| | | | | | | | A patch from Dave Malcolm.
* | Merged revisions ↵Nick Coghlan2009-11-161-24/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ........
* | Note that a number of the changes listed below were not applicable to the ↵Nick Coghlan2009-10-181-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Py3k branch, and hence the corresponding files are unchanged in this checkin. This checkin is also the first time the environment checking in regrtest has been forward ported to the Py3k branch. This checkin causes test_xmlrpc to fail - see issue 7165 (it's a bug in the 3.x version of xmlrpc.server) I am also getting a failure in test_telnetlib, but it isn't clear yet if that is due to these changes. Recorded merge of revisions 75400-75401,75404,75406,75414,75416,75422,75425-75428,75435,75439,75441-75444,75447-75449,75451-75453,75455-75458,75460-75469,75471-75473,75475-75477,75479-75481,75483,75486-75489 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75400 | r.david.murray | 2009-10-14 23:58:07 +1000 (Wed, 14 Oct 2009) | 6 lines Enhanced Issue 7058 patch, which will not be backported. Refactors the code, adds checks for stdin/out/err, cwd, and sys.path, and adds a new section in the summary for tests that modify the environment (thanks to Ezio Melotti for that suggestion). ........ r75453 | nick.coghlan | 2009-10-17 16:33:05 +1000 (Sat, 17 Oct 2009) | 1 line Correctly restore sys.stdout in test_descr ........ r75456 | nick.coghlan | 2009-10-17 17:30:40 +1000 (Sat, 17 Oct 2009) | 1 line Enhancement to the new environment checking code to print the changed items under -vv. Also includes a small tweak to allow underscores in the names of resources. ........ r75457 | nick.coghlan | 2009-10-17 17:34:27 +1000 (Sat, 17 Oct 2009) | 1 line Formatting tweak so that before and after values are vertically aligned ........ r75458 | nick.coghlan | 2009-10-17 18:21:21 +1000 (Sat, 17 Oct 2009) | 1 line Check and revert expected sys.path alterations ........ r75461 | nick.coghlan | 2009-10-18 00:40:54 +1000 (Sun, 18 Oct 2009) | 1 line Restore original sys.path when running TTK tests ........ r75462 | nick.coghlan | 2009-10-18 01:09:41 +1000 (Sun, 18 Oct 2009) | 1 line Don't invoke reload(sys) and use StringIO objects instead of real files to capture stdin and stdout when needed (ensures all sys attributes remain unmodified after test_xmlrpc runs) ........ r75463 | nick.coghlan | 2009-10-18 01:23:08 +1000 (Sun, 18 Oct 2009) | 1 line Revert changes made to environment in test_httpservers ........ r75465 | nick.coghlan | 2009-10-18 01:45:52 +1000 (Sun, 18 Oct 2009) | 1 line Move restoration of the os.environ object into the context manager where it belongs ........ r75466 | nick.coghlan | 2009-10-18 01:48:16 +1000 (Sun, 18 Oct 2009) | 1 line Also check and restore identity of sys.path, sys.argv and os.environ rather than just their values (this picked up a few more misbehaving tests) ........ r75467 | nick.coghlan | 2009-10-18 01:57:42 +1000 (Sun, 18 Oct 2009) | 1 line Avoid replacing existing modules and sys.path in import tests ........ r75468 | nick.coghlan | 2009-10-18 02:19:51 +1000 (Sun, 18 Oct 2009) | 1 line Don't replace sys.path in test_site ........ r75481 | nick.coghlan | 2009-10-18 15:38:48 +1000 (Sun, 18 Oct 2009) | 1 line Using CleanImport to revert a reload of the os module doesn't work due to function registrations in copy_reg. The perils of reloading modules even for tests... ........ r75486 | nick.coghlan | 2009-10-18 20:29:10 +1000 (Sun, 18 Oct 2009) | 1 line Silence a deprecation warning by using the appropriate replacement construct ........ r75489 | nick.coghlan | 2009-10-18 20:56:21 +1000 (Sun, 18 Oct 2009) | 1 line Restore sys.path in test_tk ........
* | convert old fail* assertions to assert*Benjamin Peterson2009-06-301-3/+3
|/
* #5924: on Windows, a large PYTHONPATH (more than 255 chars) was completely ↵Amaury Forgeot d'Arc2009-06-091-0/+10
| | | | | | ignored. Will backport to 3.0.
* Merged revisions 72817 via svnmerge fromPhilip Jenvey2009-05-221-2/+4
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72817 | philip.jenvey | 2009-05-21 22:35:32 -0700 (Thu, 21 May 2009) | 4 lines don't use subprocess.call with PIPEs as the child can fill the pipe buf and deadlock. add a warning to subprocess docs about this, similar to Popen.wait's. refs http://bugs.jython.org/issue1351 ........
* Fix test so as to also pass in debug modeAntoine Pitrou2009-01-261-1/+1
|
* Followup of #4705: we can't skip the binary buffering layer for stdin ↵Antoine Pitrou2009-01-261-0/+10
| | | | because FileIO doesn't have a read1() method
* Issue #4705: Fix the -u ("unbuffered binary stdout and stderr") command-lineAntoine Pitrou2009-01-091-0/+17
| | | | | | flag to work properly. Furthermore, when specifying -u, the text stdout and stderr streams have line-by-line buffering enabled (the default being to buffer arbitrary chunks of data). Patch by Victor Stinner, test by me.
* Enable this test only when subprocess supports non-ascii arguments.Amaury Forgeot d'Arc2008-11-121-6/+5
| | | | (it is about parsing the python command line arguments, not about subprocess)