diff options
author | Brian Quinlan <brian@sweetapp.com> | 2011-04-08 08:30:41 +1000 |
---|---|---|
committer | Brian Quinlan <brian@sweetapp.com> | 2011-04-08 08:30:41 +1000 |
commit | d08b330a1538132737d9de646a53dd9dae581d57 (patch) | |
tree | 5cc75a8b44d3a742d75e7872631c3b9e7df211bf /Lib/test | |
parent | f007876bd64def2829a242e0cf5adfd3ef25c4be (diff) | |
parent | b1eb6602703d040b91e444a8764ea1ba8af69a21 (diff) | |
download | cpython-git-d08b330a1538132737d9de646a53dd9dae581d57.tar.gz |
Merge to tip.
Diffstat (limited to 'Lib/test')
-rwxr-xr-x | Lib/test/regrtest.py | 2 | ||||
-rw-r--r-- | Lib/test/test_faulthandler.py | 7 | ||||
-rw-r--r-- | Lib/test/test_htmlparser.py | 17 |
3 files changed, 25 insertions, 1 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 704ad77dfd..414aeff141 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -240,7 +240,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, findleaks=False, use_resources=None, trace=False, coverdir='coverage', runleaks=False, huntrleaks=False, verbose2=False, print_slow=False, random_seed=None, use_mp=None, verbose3=False, forever=False, - header=False, timeout=30*60): + header=False, timeout=60*60): """Execute a test suite. This also parses command-line options and modifies its behavior diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py index 59a0a6d8da..bfe662eb02 100644 --- a/Lib/test/test_faulthandler.py +++ b/Lib/test/test_faulthandler.py @@ -8,6 +8,12 @@ from test import support, script_helper import tempfile import unittest +try: + import threading + HAVE_THREADS = True +except ImportError: + HAVE_THREADS = False + TIMEOUT = 0.5 try: @@ -279,6 +285,7 @@ funcA() with temporary_filename() as filename: self.check_dump_traceback(filename) + @unittest.skipIf(not HAVE_THREADS, 'need threads') def check_dump_traceback_threads(self, filename): """ Call explicitly dump_traceback(all_threads=True) and check the output. diff --git a/Lib/test/test_htmlparser.py b/Lib/test/test_htmlparser.py index 5ecd016084..637ab01f12 100644 --- a/Lib/test/test_htmlparser.py +++ b/Lib/test/test_htmlparser.py @@ -217,6 +217,23 @@ DOCTYPE html [ ("starttag", "a", [("href", "mailto:xyz@example.com")]), ]) + def test_attr_nonascii(self): + # see issue 7311 + self._run_check("<img src=/foo/bar.png alt=\u4e2d\u6587>", [ + ("starttag", "img", [("src", "/foo/bar.png"), + ("alt", "\u4e2d\u6587")]), + ]) + self._run_check("<a title='\u30c6\u30b9\u30c8' " + "href='\u30c6\u30b9\u30c8.html'>", [ + ("starttag", "a", [("title", "\u30c6\u30b9\u30c8"), + ("href", "\u30c6\u30b9\u30c8.html")]), + ]) + self._run_check('<a title="\u30c6\u30b9\u30c8" ' + 'href="\u30c6\u30b9\u30c8.html">', [ + ("starttag", "a", [("title", "\u30c6\u30b9\u30c8"), + ("href", "\u30c6\u30b9\u30c8.html")]), + ]) + def test_attr_entity_replacement(self): self._run_check("""<a b='&><"''>""", [ ("starttag", "a", [("b", "&><\"'")]), |