Commit graph

6660 commits

Author SHA1 Message Date
Collin Winter
89b4f13024 Style cleanup in test_import. 2010-03-17 02:40:12 +00:00
Collin Winter
ac1d93167c Fix a trivial class of (hypothetical, future) false-positive refleaks, discovered by an optimization in Unladen Swallow's past (which will become CPython's future). 2010-03-17 02:02:30 +00:00
Florent Xicluna
3cc8f211ed Issue #7783 and #7787: open_urlresource invalidates the outdated files from the local cache.
Use this feature to fix test_normalization.
2010-03-15 18:08:58 +00:00
Matthias Klose
b13d04c991 - Issue #8140: extend compileall to compile single files. Add -i option. 2010-03-15 17:44:12 +00:00
Florent Xicluna
ece29b2aac Do not hardcode Expat version. It's possible to build Python with --with-system-expat option. 2010-03-14 15:20:59 +00:00
Florent Xicluna
88db6f402e Minor documentation updates for xml.etree. 2010-03-14 01:22:09 +00:00
Florent Xicluna
1b51c3d4de Do not chdir when running test_xml_etree, and enhance the findfile helper. 2010-03-13 12:41:48 +00:00
Florent Xicluna
13ba1a1c65 Move the xml test data to their own directory. 2010-03-13 11:18:49 +00:00
Victor Stinner
17d905449d Issue #7818: set().test_c_api() doesn't expect a set('abc'), modify the set. 2010-03-13 00:13:22 +00:00
Benjamin Peterson
654ea3713e remove shebang line from non-executable test 2010-03-11 22:34:12 +00:00
Benjamin Peterson
9cf41d0c9d normalize shebang lines to #!/usr/bin/env python 2010-03-11 22:33:25 +00:00
Florent Xicluna
e2e81e8fcd Fix repr of tree Element on windows. 2010-03-11 15:55:11 +00:00
Florent Xicluna
3e8c189faa Issue #6472: The xml.etree package is updated to ElementTree 1.3. The cElementTree module is updated too. 2010-03-11 14:36:19 +00:00
Victor Stinner
4478662f83 Another fix to test_executable() of test_sys: set the current working to avoid
the #7774 bug.
2010-03-11 13:46:06 +00:00
Victor Stinner
6ecd85f401 Fix test_executable introduce in previous commit (r78835): Windows is able to
retrieve the absolute Python path even if argv[0] has been set to a non
existent program name.
2010-03-11 13:27:35 +00:00
Victor Stinner
4a7e0c858c Issue #7774: Set sys.executable to an empty string if argv[0] has been
set to an non existent program name and Python is unable to retrieve the real
program name.

Fix also sysconfig: if sys.executable is an empty string, use the current
working directory.
2010-03-11 12:34:39 +00:00
Florent Xicluna
637637021a Revert r78830: realpath() should really be applied to sys.executable. 2010-03-11 01:50:48 +00:00
Florent Xicluna
6602ec6eff It is not optimal to test sys.stderr on a debug build. 2010-03-11 01:39:55 +00:00
Florent Xicluna
e58d91c8f0 Fix the test_subprocess failure when sys.executable is meaningless: '' or a directory.
It does not fix #7774.
2010-03-11 00:56:59 +00:00
Florent Xicluna
85677617d5 Issue #7880: Fix sysconfig when the python executable is a symbolic link. 2010-03-10 23:58:42 +00:00
Florent Xicluna
4d42f2b4d1 #7772: Fix test_py3kwarn. Now the test suite could pass with "-3" flag. 2010-03-09 19:57:01 +00:00
Florent Xicluna
47627d5164 #7624: Fix isinstance(foo(), collections.Callable) for old-style classes. 2010-03-08 15:20:28 +00:00
Florent Xicluna
6f682be82b Move some tests from test_macpath to test_genericpath.CommonTest 2010-03-08 12:39:35 +00:00
Florent Xicluna
faf175385d Replace the stderr logging with assertNotEqual(returncode, 0). 2010-03-08 10:59:33 +00:00
Michael Foord
5ffa325a82 Addition of setUpClass and setUpModule shared fixtures to unittest. 2010-03-07 22:04:55 +00:00
Michael Foord
53e8eeadd6 Fix for potentials errors in constructing unittest failure messages. Plus skipped test methods no longer run setUp and tearDown (Issue 8059) 2010-03-07 20:22:12 +00:00
Florent Xicluna
fc8a1ed70e Refresh the documentation for the test.test_support module. 2010-03-07 19:14:12 +00:00
Florent Xicluna
400efc2259 #2777: Try hard to make Win7 buildbot happy... 2010-03-07 17:12:23 +00:00
Mark Dickinson
154b7ad07e Issue #1530559: When packing a non-integer with any integer conversion
code using struct.pack, attempt to convert to an integer first using
the argument's __int__ method (if present).  Also raise a
DeprecationWarning for any such usage of __int__.

This fixes a regression from 2.6, where some (but not all) integer
conversion codes already used __int__.
2010-03-07 16:24:45 +00:00
Florent Xicluna
c083864fc8 Do not fail if returncode is 0 on send_signal/kill/terminate, for win32 platforms.
Do not hide the KeyboardInterrupt on POSIX platforms.
2010-03-07 15:27:39 +00:00
Florent Xicluna
c02bbe328d #2777: Enable test_send_signal, test_terminate and test_kill on win32 platforms. 2010-03-07 12:21:36 +00:00
Florent Xicluna
6de9e938a5 Issue #7849: Now the utility `check_warnings` verifies if the warnings are
effectively raised.  A new utility ``check_py3k_warnings`` deals with py3k warnings.
2010-03-07 12:18:33 +00:00
Florent Xicluna
1f3b4e12e8 Fix some py3k warnings in the standard library. 2010-03-07 12:14:25 +00:00
Senthil Kumaran
4e62949217 Reverting the change made in r78431. 2010-03-07 04:09:30 +00:00
Benjamin Peterson
6b31fd0f13 eliminate py3k warnings in argparse 2010-03-07 00:29:44 +00:00
Florent Xicluna
632df993dc Skip test_send_signal, test_kill, test_terminate on win32 platforms, for 2.7a4 release. 2010-03-06 19:43:41 +00:00
Florent Xicluna
985478dbbb Minor tweaking of previous r78734, and add a NEWS entry. 2010-03-06 18:52:52 +00:00
Florent Xicluna
dc1531c5c4 Create test_genericpath.CommonTest and reuse it to test other path modules. 2010-03-06 18:07:18 +00:00
Florent Xicluna
58526417ed Do not print the header lines when running a single test. 2010-03-06 17:24:36 +00:00
Vinay Sajip
d45a278b93 Added schema version test in dictConfig. 2010-03-06 15:12:08 +00:00
Florent Xicluna
12d750d6b8 Backport "test.regrtest -R 2:3" syntax from py3k branch, and other minor adjustments. 2010-03-06 14:38:09 +00:00
Florent Xicluna
aa90db9477 #2777: Apply same recipe on win32, i.e. do not inherit file handles. 2010-03-06 09:54:14 +00:00
Florent Xicluna
b7c20028fe Print platform information to stdout, to help troubleshooting platform-specific failures. 2010-03-06 09:11:55 +00:00
Florent Xicluna
0932dc5671 Keep the test files in the ./build/ subdirectory, if Python is not installed.
Remove two hacks which are no longer needed after #7712, because all __file__ attributes are absolute.
2010-03-06 08:07:44 +00:00
Gregory P. Smith
467298cb42 Call setreuid and setregid in a subprocess to avoid altering the test runner's
process state.  Should fix issue8045.
2010-03-06 07:35:19 +00:00
Florent Xicluna
af9a06a77f #2777: Apply same recipe for test_terminate and test_kill, i.e. close or redirect fds. 2010-03-06 00:16:57 +00:00
Florent Xicluna
cecef392f1 #2777: Handle fds more carefully to try to fix some x86-Linux failures (namely, neal bot and twisted bot). 2010-03-05 19:31:21 +00:00
Mark Dickinson
1c0c78c61f Fix incorrect stacklevel for DeprecationWarnings originating from the struct module.
Also clean up related tests in test_struct.
The stacklevel fix should be backported to 2.6 once that branch is unfrozen.
2010-03-05 14:36:20 +00:00
Benjamin Peterson
b3be23ad27 remove the svn:executable property from files that don't have shebang lines 2010-03-05 03:20:06 +00:00
Florent Xicluna
7272acfabe These line should not be there. 2010-03-05 01:12:14 +00:00