Kaydet (Commit) 88909540 authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Merged revisions 73072 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r73072 | antoine.pitrou | 2009-05-31 16:20:14 +0200 (dim., 31 mai 2009) | 4 lines

  Issue #6152: New option '-j'/'--multiprocess' for regrtest allows running
  regression tests in parallel, shortening the total runtime.
........
üst 6fbdfdab
......@@ -654,6 +654,12 @@ Other Changes and Fixes
The :option:`-r` option also now reports the seed that was used
(Added by Collin Winter.)
* The :file:`regrtest.py` script now takes a :option:`-j` switch
that takes an integer specifying how many tests run in parallel. This
allows to shorten the total runtime on multi-core machines.
This option is compatible with several other options, including the
:option:`-R` switch which is known to produce long runtimes.
(Added by Antoine Pitrou, :issue:`6152`.)
.. ======================================================================
......
This diff is collapsed.
......@@ -336,34 +336,38 @@ if os.name == 'java':
else:
TESTFN = '@test'
# Assuming sys.getfilesystemencoding()!=sys.getdefaultencoding()
# TESTFN_UNICODE is a filename that can be encoded using the
# file system encoding, but *not* with the default (ascii) encoding
TESTFN_UNICODE = "@test-\xe0\xf2"
TESTFN_ENCODING = sys.getfilesystemencoding()
# TESTFN_UNICODE_UNENCODEABLE is a filename that should *not* be
# able to be encoded by *either* the default or filesystem encoding.
# This test really only makes sense on Windows NT platforms
# which have special Unicode support in posixmodule.
if (not hasattr(sys, "getwindowsversion") or
sys.getwindowsversion()[3] < 2): # 0=win32s or 1=9x/ME
TESTFN_UNICODE_UNENCODEABLE = None
# Disambiguate TESTFN for parallel testing, while letting it remain a valid
# module name.
TESTFN = "{0}_{1}_tmp".format(TESTFN, os.getpid())
# Assuming sys.getfilesystemencoding()!=sys.getdefaultencoding()
# TESTFN_UNICODE is a filename that can be encoded using the
# file system encoding, but *not* with the default (ascii) encoding
TESTFN_UNICODE = TESTFN + "-\xe0\xf2"
TESTFN_ENCODING = sys.getfilesystemencoding()
# TESTFN_UNICODE_UNENCODEABLE is a filename that should *not* be
# able to be encoded by *either* the default or filesystem encoding.
# This test really only makes sense on Windows NT platforms
# which have special Unicode support in posixmodule.
if (not hasattr(sys, "getwindowsversion") or
sys.getwindowsversion()[3] < 2): # 0=win32s or 1=9x/ME
TESTFN_UNICODE_UNENCODEABLE = None
else:
# Japanese characters (I think - from bug 846133)
TESTFN_UNICODE_UNENCODEABLE = TESTFN + "-\u5171\u6709\u3055\u308c\u308b"
try:
# XXX - Note - should be using TESTFN_ENCODING here - but for
# Windows, "mbcs" currently always operates as if in
# errors=ignore' mode - hence we get '?' characters rather than
# the exception. 'Latin1' operates as we expect - ie, fails.
# See [ 850997 ] mbcs encoding ignores errors
TESTFN_UNICODE_UNENCODEABLE.encode("Latin1")
except UnicodeEncodeError:
pass
else:
# Japanese characters (I think - from bug 846133)
TESTFN_UNICODE_UNENCODEABLE = "@test-\u5171\u6709\u3055\u308c\u308b"
try:
# XXX - Note - should be using TESTFN_ENCODING here - but for
# Windows, "mbcs" currently always operates as if in
# errors=ignore' mode - hence we get '?' characters rather than
# the exception. 'Latin1' operates as we expect - ie, fails.
# See [ 850997 ] mbcs encoding ignores errors
TESTFN_UNICODE_UNENCODEABLE.encode("Latin1")
except UnicodeEncodeError:
pass
else:
print('WARNING: The filename %r CAN be encoded by the filesystem. '
'Unicode filename tests may not be effective'
% TESTFN_UNICODE_UNENCODEABLE)
print('WARNING: The filename %r CAN be encoded by the filesystem. '
'Unicode filename tests may not be effective'
% TESTFN_UNICODE_UNENCODEABLE)
# Make sure we can write to TESTFN, try in /tmp if we can't
fp = None
......
......@@ -496,6 +496,7 @@ class ParserStackLimitTestCase(unittest.TestCase):
e = self._nested_expression(100)
print("Expecting 's_push: parser stack overflow' in next line",
file=sys.stderr)
sys.stderr.flush()
self.assertRaises(MemoryError, parser.expr, e)
class STObjectTestCase(unittest.TestCase):
......
......@@ -1382,6 +1382,9 @@ Extension Modules
Tests
-----
- Issue #6152: New option '-j'/'--multiprocess' for regrtest allows running
regression tests in parallel, shortening the total runtime.
- Issue #5450: Moved tests involving loading tk from Lib/test/test_tcl to
Lib/tkinter/test/test_tkinter/test_loadtk. With this, these tests demonstrate
the same behaviour as test_ttkguionly (and now also test_tk) which is to
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment