diff options
Diffstat (limited to 'Lib/test')
| -rw-r--r-- | Lib/test/test_codeop.py | 2 | ||||
| -rw-r--r-- | Lib/test/test_docxmlrpc.py | 2 | ||||
| -rw-r--r-- | Lib/test/test_imaplib.py | 2 | ||||
| -rw-r--r-- | Lib/test/test_minidom.py | 2 | ||||
| -rw-r--r-- | Lib/test/test_os.py | 16 | ||||
| -rw-r--r-- | Lib/test/test_pty.py | 2 | ||||
| -rw-r--r-- | Lib/test/test_sax.py | 4 | ||||
| -rw-r--r-- | Lib/test/test_signal.py | 4 | ||||
| -rw-r--r-- | Lib/test/test_socketserver.py | 2 | ||||
| -rw-r--r-- | Lib/test/test_sys_settrace.py | 2 | ||||
| -rw-r--r-- | Lib/test/test_time.py | 2 | ||||
| -rw-r--r-- | Lib/test/test_uu.py | 4 | ||||
| -rw-r--r-- | Lib/test/test_winreg.py | 4 | ||||
| -rw-r--r-- | Lib/test/test_zipfile.py | 2 |
14 files changed, 25 insertions, 25 deletions
diff --git a/Lib/test/test_codeop.py b/Lib/test/test_codeop.py index 99fe6f9..00cd3ce 100644 --- a/Lib/test/test_codeop.py +++ b/Lib/test/test_codeop.py @@ -50,7 +50,7 @@ class CodeopTests(unittest.TestCase): '''succeed iff str is the start of an invalid piece of code''' try: compile_command(str,symbol=symbol) - self.fail("No exception thrown for invalid code") + self.fail("No exception raised for invalid code") except SyntaxError: self.assertTrue(is_syntax) except OverflowError: diff --git a/Lib/test/test_docxmlrpc.py b/Lib/test/test_docxmlrpc.py index 716333e..80d1803 100644 --- a/Lib/test/test_docxmlrpc.py +++ b/Lib/test/test_docxmlrpc.py @@ -100,7 +100,7 @@ class DocXMLRPCHTTPGETServer(unittest.TestCase): self.assertEqual(response.status, 200) self.assertEqual(response.getheader("Content-type"), "text/html") - # Server throws an exception if we don't start to read the data + # Server raises an exception if we don't start to read the data response.read() def test_invalid_get_response(self): diff --git a/Lib/test/test_imaplib.py b/Lib/test/test_imaplib.py index 15b0ea0..2b2213d 100644 --- a/Lib/test/test_imaplib.py +++ b/Lib/test/test_imaplib.py @@ -79,7 +79,7 @@ class SimpleIMAPHandler(SocketServer.StreamRequestHandler): return line += part except IOError: - # ..but SSLSockets throw exceptions. + # ..but SSLSockets raise exceptions. return if line.endswith('\r\n'): break diff --git a/Lib/test/test_minidom.py b/Lib/test/test_minidom.py index 060c1a5..ca0f0f7 100644 --- a/Lib/test/test_minidom.py +++ b/Lib/test/test_minidom.py @@ -1060,7 +1060,7 @@ class MinidomTest(unittest.TestCase): '<?xml version="1.0" encoding="iso-8859-15"?><foo>\xa4</foo>', "testEncodings - encoding EURO SIGN") - # Verify that character decoding errors throw exceptions instead + # Verify that character decoding errors raise exceptions instead # of crashing self.assertRaises(UnicodeDecodeError, parseString, '<fran\xe7ais>Comment \xe7a va ? Tr\xe8s bien ?</fran\xe7ais>') diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 1d673f6..bdbeb01 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -214,33 +214,33 @@ class StatAttributeTests(unittest.TestCase): try: result[200] - self.fail("No exception thrown") + self.fail("No exception raised") except IndexError: pass # Make sure that assignment fails try: result.st_mode = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except (AttributeError, TypeError): pass try: result.st_rdev = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except (AttributeError, TypeError): pass try: result.parrot = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except AttributeError: pass # Use the stat_result constructor with a too-short tuple. try: result2 = os.stat_result((10,)) - self.fail("No exception thrown") + self.fail("No exception raised") except TypeError: pass @@ -274,20 +274,20 @@ class StatAttributeTests(unittest.TestCase): # Make sure that assignment really fails try: result.f_bfree = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except TypeError: pass try: result.parrot = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except AttributeError: pass # Use the constructor with a too-short tuple. try: result2 = os.statvfs_result((10,)) - self.fail("No exception thrown") + self.fail("No exception raised") except TypeError: pass diff --git a/Lib/test/test_pty.py b/Lib/test/test_pty.py index 623f23b..bec38c4 100644 --- a/Lib/test/test_pty.py +++ b/Lib/test/test_pty.py @@ -152,7 +152,7 @@ class PtyTest(unittest.TestCase): # platform-dependent amount of data is written to its fd. On # Linux 2.6, it's 4000 bytes and the child won't block, but on OS # X even the small writes in the child above will block it. Also - # on Linux, the read() will throw an OSError (input/output error) + # on Linux, the read() will raise an OSError (input/output error) # when it tries to read past the end of the buffer but the child's # already exited, so catch and discard those exceptions. It's not # worth checking for EIO. diff --git a/Lib/test/test_sax.py b/Lib/test/test_sax.py index adb9305..c3b44f8 100644 --- a/Lib/test/test_sax.py +++ b/Lib/test/test_sax.py @@ -294,7 +294,7 @@ class XmlgenTest(unittest.TestCase): def test_5027_1(self): # The xml prefix (as in xml:lang below) is reserved and bound by # definition to http://www.w3.org/XML/1998/namespace. XMLGenerator had - # a bug whereby a KeyError is thrown because this namespace is missing + # a bug whereby a KeyError is raised because this namespace is missing # from a dictionary. # # This test demonstrates the bug by parsing a document. @@ -320,7 +320,7 @@ class XmlgenTest(unittest.TestCase): def test_5027_2(self): # The xml prefix (as in xml:lang below) is reserved and bound by # definition to http://www.w3.org/XML/1998/namespace. XMLGenerator had - # a bug whereby a KeyError is thrown because this namespace is missing + # a bug whereby a KeyError is raised because this namespace is missing # from a dictionary. # # This test demonstrates the bug by direct manipulation of the diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py index 8feb145..2803785 100644 --- a/Lib/test/test_signal.py +++ b/Lib/test/test_signal.py @@ -109,7 +109,7 @@ class InterProcessSignalTests(unittest.TestCase): # This wait should be interrupted by the signal's exception. self.wait(child) time.sleep(1) # Give the signal time to be delivered. - self.fail('HandlerBCalled exception not thrown') + self.fail('HandlerBCalled exception not raised') except HandlerBCalled: self.assertTrue(self.b_called) self.assertFalse(self.a_called) @@ -148,7 +148,7 @@ class InterProcessSignalTests(unittest.TestCase): # test-running process from all the signals. It then # communicates with that child process over a pipe and # re-raises information about any exceptions the child - # throws. The real work happens in self.run_test(). + # raises. The real work happens in self.run_test(). os_done_r, os_done_w = os.pipe() with closing(os.fdopen(os_done_r)) as done_r, \ closing(os.fdopen(os_done_w, 'w')) as done_w: diff --git a/Lib/test/test_socketserver.py b/Lib/test/test_socketserver.py index 3b333bc..0dbb8e2 100644 --- a/Lib/test/test_socketserver.py +++ b/Lib/test/test_socketserver.py @@ -58,7 +58,7 @@ if HAVE_UNIX_SOCKETS: def simple_subprocess(testcase): pid = os.fork() if pid == 0: - # Don't throw an exception; it would be caught by the test harness. + # Don't raise an exception; it would be caught by the test harness. os._exit(72) yield None pid2, status = os.waitpid(pid, 0) diff --git a/Lib/test/test_sys_settrace.py b/Lib/test/test_sys_settrace.py index 57a7839..9c7bcef 100644 --- a/Lib/test/test_sys_settrace.py +++ b/Lib/test/test_sys_settrace.py @@ -417,7 +417,7 @@ class RaisingTraceFuncTestCase(unittest.TestCase): except ValueError: pass else: - self.fail("exception not thrown!") + self.fail("exception not raised!") except RuntimeError: self.fail("recursion counter not reset") diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py index 28917ca..4571c10 100644 --- a/Lib/test/test_time.py +++ b/Lib/test/test_time.py @@ -106,7 +106,7 @@ class TimeTestCase(unittest.TestCase): def test_strptime(self): # Should be able to go round-trip from strftime to strptime without - # throwing an exception. + # raising an exception. tt = time.gmtime(self.t) for directive in ('a', 'A', 'b', 'B', 'c', 'd', 'H', 'I', 'j', 'm', 'M', 'p', 'S', diff --git a/Lib/test/test_uu.py b/Lib/test/test_uu.py index 95c9552..31046b0 100644 --- a/Lib/test/test_uu.py +++ b/Lib/test/test_uu.py @@ -48,7 +48,7 @@ class UUTest(unittest.TestCase): out = cStringIO.StringIO() try: uu.decode(inp, out) - self.fail("No exception thrown") + self.fail("No exception raised") except uu.Error, e: self.assertEqual(str(e), "Truncated input file") @@ -57,7 +57,7 @@ class UUTest(unittest.TestCase): out = cStringIO.StringIO() try: uu.decode(inp, out) - self.fail("No exception thrown") + self.fail("No exception raised") except uu.Error, e: self.assertEqual(str(e), "No valid begin line found in input file") diff --git a/Lib/test/test_winreg.py b/Lib/test/test_winreg.py index bdf4e14..c6268e1 100644 --- a/Lib/test/test_winreg.py +++ b/Lib/test/test_winreg.py @@ -234,7 +234,7 @@ class LocalWinregTests(BaseWinregTests): def test_changing_value(self): # Issue2810: A race condition in 2.6 and 3.1 may cause - # EnumValue or QueryValue to throw "WindowsError: More data is + # EnumValue or QueryValue to raise "WindowsError: More data is # available" done = False @@ -282,7 +282,7 @@ class LocalWinregTests(BaseWinregTests): def test_dynamic_key(self): # Issue2810, when the value is dynamically generated, these - # throw "WindowsError: More data is available" in 2.6 and 3.1 + # raise "WindowsError: More data is available" in 2.6 and 3.1 try: EnumValue(HKEY_PERFORMANCE_DATA, 0) except OSError as e: diff --git a/Lib/test/test_zipfile.py b/Lib/test/test_zipfile.py index 087a90a..9bd3b58 100644 --- a/Lib/test/test_zipfile.py +++ b/Lib/test/test_zipfile.py @@ -811,7 +811,7 @@ class OtherTests(unittest.TestCase): with zipfile.ZipFile(data, mode="w") as zipf: zipf.writestr("foo.txt", "O, for a Muse of Fire!") - # This is correct; calling .read on a closed ZipFile should throw + # This is correct; calling .read on a closed ZipFile should raise # a RuntimeError, and so should calling .testzip. An earlier # version of .testzip would swallow this exception (and any other) # and report that the first file in the archive was corrupt. |
