Ezio Melotti
ec6486d52d
#16306 : report only the first unknown option and add more tests. Patch by Serhiy Storchaka.
2012-11-23 18:46:11 +02:00
Ezio Melotti
db5947f0f3
#16306 : Fix multiple error messages when unknown command line parameters where passed to the interpreter. Patch by Hieu Nguyen.
2012-11-18 13:46:38 +02:00
Hynek Schlawack
b271b3e188
Issue #15001 : fix segfault on "del sys.modules['__main__']"
...
Patch by Victor Stinner.
2012-11-07 09:41:28 +01:00
Benjamin Peterson
aee9dfba4a
merge 2.6 with hash randomization fix
2012-02-20 21:44:56 -05:00
Barry Warsaw
1e13eb084f
- Issue #13703 : oCERT-2011-003: add -R command-line option and PYTHONHASHSEED
...
environment variable, to provide an opt-in way to protect against denial of
service attacks due to hash collisions within the dict and set types. Patch
by David Malcolm, based on work by Victor Stinner.
2012-02-20 20:42:21 -05:00
Georg Brandl
a4f46e1292
Remove unused imports in test modules.
2010-02-07 17:03:15 +00:00
Ezio Melotti
aa98058cc4
use assert[Not]In where appropriate
2010-01-23 23:04:36 +00:00
Nick Coghlan
49868cb686
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.
2009-11-15 07:30:34 +00:00
Philip Jenvey
739aa36818
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
2009-05-22 05:35:32 +00:00
Nick Coghlan
327a39b047
Patch #1739468 : Directories and zipfiles containing __main__.py are now executable
2007-11-18 11:56:28 +00:00
Nick Coghlan
1df42b118c
Always use the -E flag when spawning subprocesses in test_cmd_line (Issue 1056)
2007-09-11 14:01:18 +00:00
Nick Coghlan
1a42ece0c7
Fix bug 1764407 - the -i switch now does the right thing when using the -m switch
2007-08-25 10:50:41 +00:00
Neal Norwitz
42dd86b8e2
Deprecate os.popen* and popen2 module in favor of the subprocess module.
2007-05-11 06:57:33 +00:00
Martin v. Löwis
cd1210a55f
Patch #1559413 : Fix test_cmd_line if sys.executable contains a space.
...
Will backport.
2007-03-14 20:02:31 +00:00
Neal Norwitz
b15ac3169d
Add new utility function, reap_children(), to test_support. This should
...
be called at the end of each test that spawns children (perhaps it
should be called from regrtest instead?). This will hopefully prevent
some of the unexplained failures in the buildbots (hppa and alpha)
during tests that spawn children. The problems were not reproducible.
There were many zombies that remained at the end of several tests.
In the worst case, this shouldn't cause any more problems,
though it may not help either. Time will tell.
2006-06-29 04:10:08 +00:00
Nick Coghlan
03f76cfbf3
More reliable version of new command line tests that just checks the exit codes
2006-04-24 05:52:15 +00:00
Nick Coghlan
314dadbf98
Back out new command line tests (broke buildbot)
2006-04-24 05:24:26 +00:00
Nick Coghlan
27ec1a773c
Add unit tests for the -m and -c command line switches
2006-04-24 04:32:47 +00:00
Neal Norwitz
4b16de4350
Add a comment to explain why we are calling _cleanup()
2006-04-17 02:41:25 +00:00
Neal Norwitz
00ac0d22f3
Try to stop the test from leaking and yet still work on windows
2006-04-17 02:39:37 +00:00
Neal Norwitz
cb0f66f0ab
Get test to consistently show no leaks
2006-04-17 01:48:06 +00:00
Neal Norwitz
72c2c062d7
Try to be a bit more consistent on all platforms:
...
python .
python < .
both print a message, return non-zero and do not core dump.
2006-03-09 05:58:11 +00:00
Hye-Shik Chang
e2f8e3c14f
Fix test not to fail on FreeBSD. Directories work also as data
...
files on the platform.
2005-12-13 17:06:45 +00:00
Walter Dörwald
9356fb9881
SF patch #1364545 : test_cmd_line.py relied on english error messages when
...
invoking the Python interpreter (which didn't work on non-english Windows
versions). Check return codes instead.
2005-11-25 15:22:10 +00:00
Tim Peters
383d3c0a68
test_directories(): This test had no chance of passing on
...
Windows. Hacked it to pass, but not sure it's worth the
bother.
2005-10-30 01:15:38 +00:00
Guido van Rossum
c252c5964c
Fix unit test failure -- the output received from Python can be empty,
...
but verify_valid_flag() wasn't expecting that. Will backport.
2005-10-08 20:04:35 +00:00
Neal Norwitz
11bd119226
SF bug #887946 , segfault if redirecting directory
...
Also provide a warning if a directory is passed on the command line.
Add minimal command line test.
Will backport.
2005-10-03 00:54:56 +00:00