diff options
author | Min ho Kim <minho42@gmail.com> | 2019-08-30 20:21:19 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2019-08-30 20:21:19 (GMT) |
commit | 39d87b54715197ca9dcb6902bb43461c0ed701a2 (patch) | |
tree | 778362acb785069882291e2e39f64fd395d73889 /Lib/test | |
parent | 15119bc2a7e902ae1c6988556c3bef3de87fa789 (diff) | |
download | cpython-39d87b54715197ca9dcb6902bb43461c0ed701a2.zip cpython-39d87b54715197ca9dcb6902bb43461c0ed701a2.tar.gz cpython-39d87b54715197ca9dcb6902bb43461c0ed701a2.tar.bz2 |
Fix typos mostly in comments, docs and test names (GH-15209)
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/lock_tests.py | 2 | ||||
-rw-r--r-- | Lib/test/test_cmd_line_script.py | 2 | ||||
-rw-r--r-- | Lib/test/test_collections.py | 2 | ||||
-rw-r--r-- | Lib/test/test_descr.py | 2 | ||||
-rw-r--r-- | Lib/test/test_format.py | 2 | ||||
-rw-r--r-- | Lib/test/test_gc.py | 2 | ||||
-rw-r--r-- | Lib/test/test_hmac.py | 6 | ||||
-rw-r--r-- | Lib/test/test_importlib/source/test_file_loader.py | 2 | ||||
-rw-r--r-- | Lib/test/test_importlib/test_main.py | 2 | ||||
-rw-r--r-- | Lib/test/test_importlib/util.py | 2 | ||||
-rw-r--r-- | Lib/test/test_statistics.py | 4 | ||||
-rw-r--r-- | Lib/test/test_tracemalloc.py | 4 | ||||
-rw-r--r-- | Lib/test/test_warnings/__init__.py | 2 | ||||
-rw-r--r-- | Lib/test/test_winreg.py | 2 | ||||
-rw-r--r-- | Lib/test/test_wsgiref.py | 4 |
15 files changed, 20 insertions, 20 deletions
diff --git a/Lib/test/lock_tests.py b/Lib/test/lock_tests.py index 8885868..d12a86e 100644 --- a/Lib/test/lock_tests.py +++ b/Lib/test/lock_tests.py @@ -467,7 +467,7 @@ class ConditionTests(BaseTestCase): # of the workers. # Secondly, this test assumes that condition variables are not subject # to spurious wakeups. The absence of spurious wakeups is an implementation - # detail of Condition Cariables in current CPython, but in general, not + # detail of Condition Variables in current CPython, but in general, not # a guaranteed property of condition variables as a programming # construct. In particular, it is possible that this can no longer # be conveniently guaranteed should their implementation ever change. diff --git a/Lib/test/test_cmd_line_script.py b/Lib/test/test_cmd_line_script.py index c8bf8af..6072307 100644 --- a/Lib/test/test_cmd_line_script.py +++ b/Lib/test/test_cmd_line_script.py @@ -474,7 +474,7 @@ class CmdLineTest(unittest.TestCase): ('os.path', br'loader.*cannot handle'), ('importlib', br'No module named.*' br'is a package and cannot be directly executed'), - ('importlib.nonexistant', br'No module named'), + ('importlib.nonexistent', br'No module named'), ('.unittest', br'Relative module names not supported'), ) for name, regex in tests: diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py index 7f01de6..a2a66a7 100644 --- a/Lib/test/test_collections.py +++ b/Lib/test/test_collections.py @@ -1927,7 +1927,7 @@ class TestCounter(unittest.TestCase): 'r', 'c', 'd', ' ', 's', 's', 'i', 'i', 'm', 'm', 'l']) # Math operations order first by the order encountered in the left - # operand and then by the order encounted in the right operand. + # operand and then by the order encountered in the right operand. ps = 'aaabbcdddeefggghhijjjkkl' qs = 'abbcccdeefffhkkllllmmnno' order = {letter: i for i, letter in enumerate(dict.fromkeys(ps + qs))} diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index 770e0c4..4368bb5 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -3025,7 +3025,7 @@ order (MRO) for bases """ # Testing a str subclass used as dict key .. class cistr(str): - """Sublcass of str that computes __eq__ case-insensitively. + """Subclass of str that computes __eq__ case-insensitively. Also computes a hash code of the string in canonical form. """ diff --git a/Lib/test/test_format.py b/Lib/test/test_format.py index 83804cb..4559cd5 100644 --- a/Lib/test/test_format.py +++ b/Lib/test/test_format.py @@ -48,7 +48,7 @@ def testformat(formatstr, args, output=None, limit=None, overflowok=False): def testcommon(formatstr, args, output=None, limit=None, overflowok=False): # if formatstr is a str, test str, bytes, and bytearray; - # otherwise, test bytes and bytearry + # otherwise, test bytes and bytearray if isinstance(formatstr, str): testformat(formatstr, args, output, limit, overflowok) b_format = formatstr.encode('ascii') diff --git a/Lib/test/test_gc.py b/Lib/test/test_gc.py index 2dab530..311143d 100644 --- a/Lib/test/test_gc.py +++ b/Lib/test/test_gc.py @@ -912,7 +912,7 @@ class GCCallbackTests(unittest.TestCase): def test_collect_garbage(self): self.preclean() # Each of these cause four objects to be garbage: Two - # Uncolectables and their instance dicts. + # Uncollectables and their instance dicts. Uncollectable() Uncollectable() C1055820(666) diff --git a/Lib/test/test_hmac.py b/Lib/test/test_hmac.py index 896bbe9..f2eb6d7 100644 --- a/Lib/test/test_hmac.py +++ b/Lib/test/test_hmac.py @@ -445,7 +445,7 @@ class CompareDigestTestCase(unittest.TestCase): a, b = bytearray(b"foobar"), bytearray(b"foobar") self.assertTrue(hmac.compare_digest(a, b)) - # Testing bytearrays of diffeent lengths + # Testing bytearrays of different lengths a, b = bytearray(b"foobar"), bytearray(b"foo") self.assertFalse(hmac.compare_digest(a, b)) @@ -458,7 +458,7 @@ class CompareDigestTestCase(unittest.TestCase): self.assertTrue(hmac.compare_digest(a, b)) self.assertTrue(hmac.compare_digest(b, a)) - # Testing byte bytearray of diffeent lengths + # Testing byte bytearray of different lengths a, b = bytearray(b"foobar"), b"foo" self.assertFalse(hmac.compare_digest(a, b)) self.assertFalse(hmac.compare_digest(b, a)) @@ -472,7 +472,7 @@ class CompareDigestTestCase(unittest.TestCase): a, b = "foobar", "foobar" self.assertTrue(hmac.compare_digest(a, b)) - # Testing str of diffeent lengths + # Testing str of different lengths a, b = "foo", "foobar" self.assertFalse(hmac.compare_digest(a, b)) diff --git a/Lib/test/test_importlib/source/test_file_loader.py b/Lib/test/test_importlib/source/test_file_loader.py index 3ffb2aa..ab44722 100644 --- a/Lib/test/test_importlib/source/test_file_loader.py +++ b/Lib/test/test_importlib/source/test_file_loader.py @@ -325,7 +325,7 @@ class SimpleTest(abc.LoaderTests): ) @util.writes_bytecode_files - def test_overiden_unchecked_hash_based_pyc(self): + def test_overridden_unchecked_hash_based_pyc(self): with util.create_modules('_temp') as mapping, \ unittest.mock.patch('_imp.check_hash_based_pycs', 'always'): source = mapping['_temp'] diff --git a/Lib/test/test_importlib/test_main.py b/Lib/test/test_importlib/test_main.py index bc42b83..3d7da81 100644 --- a/Lib/test/test_importlib/test_main.py +++ b/Lib/test/test_importlib/test_main.py @@ -32,7 +32,7 @@ class BasicTests(fixtures.DistInfoPkg, unittest.TestCase): class ImportTests(fixtures.DistInfoPkg, unittest.TestCase): def test_import_nonexistent_module(self): # Ensure that the MetadataPathFinder does not crash an import of a - # non-existant module. + # non-existent module. with self.assertRaises(ImportError): importlib.import_module('does_not_exist') diff --git a/Lib/test/test_importlib/util.py b/Lib/test/test_importlib/util.py index 913db4b..5aaf277 100644 --- a/Lib/test/test_importlib/util.py +++ b/Lib/test/test_importlib/util.py @@ -443,7 +443,7 @@ def create_package(file, path, is_package=True, contents=()): yield entry name = 'testingpackage' - # Unforunately importlib.util.module_from_spec() was not introduced until + # Unfortunately importlib.util.module_from_spec() was not introduced until # Python 3.5. module = types.ModuleType(name) loader = Reader() diff --git a/Lib/test/test_statistics.py b/Lib/test/test_statistics.py index 23dd96e..01b317c 100644 --- a/Lib/test/test_statistics.py +++ b/Lib/test/test_statistics.py @@ -1810,13 +1810,13 @@ class TestMode(NumericTestCase, AverageMixin, UnivariateTypeMixin): # Test mode with bimodal data. data = [1, 1, 2, 2, 2, 2, 3, 4, 5, 6, 6, 6, 6, 7, 8, 9, 9] assert data.count(2) == data.count(6) == 4 - # mode() should return 2, the first encounted mode + # mode() should return 2, the first encountered mode self.assertEqual(self.func(data), 2) def test_unique_data(self): # Test mode when data points are all unique. data = list(range(10)) - # mode() should return 0, the first encounted mode + # mode() should return 0, the first encountered mode self.assertEqual(self.func(data), 0) def test_none_data(self): diff --git a/Lib/test/test_tracemalloc.py b/Lib/test/test_tracemalloc.py index c386648..4b9bf4e 100644 --- a/Lib/test/test_tracemalloc.py +++ b/Lib/test/test_tracemalloc.py @@ -885,7 +885,7 @@ class TestCommandLine(unittest.TestCase): return if b'PYTHONTRACEMALLOC: invalid number of frames' in stderr: return - self.fail(f"unexpeced output: {stderr!a}") + self.fail(f"unexpected output: {stderr!a}") def test_env_var_invalid(self): @@ -914,7 +914,7 @@ class TestCommandLine(unittest.TestCase): return if b'-X tracemalloc=NFRAME: invalid number of frames' in stderr: return - self.fail(f"unexpeced output: {stderr!a}") + self.fail(f"unexpected output: {stderr!a}") def test_sys_xoptions_invalid(self): for nframe in INVALID_NFRAME: diff --git a/Lib/test/test_warnings/__init__.py b/Lib/test/test_warnings/__init__.py index be848b2..d103182 100644 --- a/Lib/test/test_warnings/__init__.py +++ b/Lib/test/test_warnings/__init__.py @@ -714,7 +714,7 @@ class _WarningsTests(BaseTest, unittest.TestCase): self.assertRaises(TypeError, self.module.warn, "Warning!") def test_show_warning_output(self): - # With showarning() missing, make sure that output is okay. + # With showwarning() missing, make sure that output is okay. text = 'test show_warning' with original_warnings.catch_warnings(module=self.module): self.module.filterwarnings("always", category=UserWarning) diff --git a/Lib/test/test_winreg.py b/Lib/test/test_winreg.py index dc2b46e..91a2bbc 100644 --- a/Lib/test/test_winreg.py +++ b/Lib/test/test_winreg.py @@ -229,7 +229,7 @@ class LocalWinregTests(BaseWinregTests): h.Close() self.assertEqual(h.handle, 0) - def test_inexistant_remote_registry(self): + def test_nonexistent_remote_registry(self): connect = lambda: ConnectRegistry("abcdefghijkl", HKEY_CURRENT_USER) self.assertRaises(OSError, connect) diff --git a/Lib/test/test_wsgiref.py b/Lib/test/test_wsgiref.py index bce3329..6af4514 100644 --- a/Lib/test/test_wsgiref.py +++ b/Lib/test/test_wsgiref.py @@ -586,10 +586,10 @@ class HandlerTests(TestCase): expected.update({ # X doesn't exist in os_environ "X": "Y", - # HOME is overriden by TestHandler + # HOME is overridden by TestHandler 'HOME': "/override/home", - # overriden by setup_testing_defaults() + # overridden by setup_testing_defaults() "SCRIPT_NAME": "", "SERVER_NAME": "127.0.0.1", |