]> granicus.if.org Git - python/commitdiff
#18741: fix more typos. Patch by Févry Thibault.
authorEzio Melotti <ezio.melotti@gmail.com>
Sat, 17 Aug 2013 13:07:38 +0000 (16:07 +0300)
committerEzio Melotti <ezio.melotti@gmail.com>
Sat, 17 Aug 2013 13:07:38 +0000 (16:07 +0300)
16 files changed:
Lib/ctypes/test/runtests.py
Lib/ctypes/test/test_cfuncs.py
Lib/ctypes/test/test_numbers.py
Lib/ctypes/test/test_refcounts.py
Lib/ctypes/test/test_structures.py
Lib/distutils/command/sdist.py
Lib/distutils/tests/test_build_clib.py
Lib/idlelib/idle_test/mock_tk.py
Lib/idlelib/idle_test/test_formatparagraph.py
Lib/lib2to3/fixes/fix_itertools.py
Lib/lib2to3/fixes/fix_metaclass.py
Lib/lib2to3/tests/test_parser.py
Lib/sqlite3/test/regression.py
Lib/sqlite3/test/types.py
Lib/test/test_support.py
Lib/unittest/test/test_loader.py

index ec31fc831dd6b991518421f46ca2f4829c226b46..b7a2b264721eddea3c685204f6409f3fd656e71a 100644 (file)
@@ -2,7 +2,7 @@
 
 Run all tests found in this directory, and print a summary of the results.
 Command line flags:
-  -q     quiet mode: don't prnt anything while the tests are running
+  -q     quiet mode: don't print anything while the tests are running
   -r     run tests repeatedly, look for refcount leaks
   -u<resources>
          Add resources to the lits of allowed resources. '*' allows all
index 493cbe979ce0bdc0cb0fd807d79bfe952544cb8e..598776e00805d72ec4643499e2e5bd39f4236cd4 100644 (file)
@@ -188,7 +188,7 @@ class CFunctions(unittest.TestCase):
         self.assertEqual(self._dll.tv_i(-42), None)
         self.assertEqual(self.S(), -42)
 
-# The following repeates the above tests with stdcall functions (where
+# The following repeats the above tests with stdcall functions (where
 # they are available)
 try:
     WinDLL
index 79239068306c812ccd20e0fa971fbdcab57ef391..555e04a4a9b07196883544033251670dfcfa092c 100644 (file)
@@ -212,7 +212,7 @@ class NumberTestCase(unittest.TestCase):
 
     def test_init(self):
         # c_int() can be initialized from Python's int, and c_int.
-        # Not from c_long or so, which seems strange, abd should
+        # Not from c_long or so, which seems strange, abc should
         # probably be changed:
         self.assertRaises(TypeError, c_int, c_long(42))
 
index 35a81aa40be0c100c8463f114cfe7853d0972517..fe4c4b9259657548f42dfe42904277ec4f686644 100644 (file)
@@ -41,7 +41,7 @@ class RefcountTestCase(unittest.TestCase):
         # this is the standard refcount for func
         self.assertEqual(grc(func), 2)
 
-        # the CFuncPtr instance holds atr least one refcount on func:
+        # the CFuncPtr instance holds at least one refcount on func:
         f = OtherCallback(func)
         self.assertTrue(grc(func) > 2)
 
@@ -58,7 +58,7 @@ class RefcountTestCase(unittest.TestCase):
         x = X()
         x.a = OtherCallback(func)
 
-        # the CFuncPtr instance holds atr least one refcount on func:
+        # the CFuncPtr instance holds at least one refcount on func:
         self.assertTrue(grc(func) > 2)
 
         # and may release it again
@@ -71,7 +71,7 @@ class RefcountTestCase(unittest.TestCase):
 
         f = OtherCallback(func)
 
-        # the CFuncPtr instance holds atr least one refcount on func:
+        # the CFuncPtr instance holds at least one refcount on func:
         self.assertTrue(grc(func) > 2)
 
         # create a cycle
index 2d7c816b2417f3794e3741996fd95224c781f885..a3350ce7774e70e01b529478dffa01b303efd1b1 100644 (file)
@@ -108,7 +108,7 @@ class StructureTestCase(unittest.TestCase):
     def test_emtpy(self):
         # I had problems with these
         #
-        # Although these are patological cases: Empty Structures!
+        # Although these are pathological cases: Empty Structures!
         class X(Structure):
             _fields_ = []
 
index d30de10673c9e024c26c3c0450377e32a7c93462..821420d62b8b096b926c5006c07a2fb99f4a4483 100644 (file)
@@ -183,7 +183,7 @@ class sdist(Command):
         depends on the user's options.
         """
         # new behavior when using a template:
-        # the file list is recalculated everytime because
+        # the file list is recalculated every time because
         # even if MANIFEST.in or setup.py are not changed
         # the user might have added some files in the tree that
         # need to be included.
index bef1bd99536e6a4bd945cbf11d15f552159129b0..12faa8a95482c8a50724b7868c2d8767ec8bf2a4 100644 (file)
@@ -77,7 +77,7 @@ class BuildCLibTestCase(support.TempdirManager,
 
         cmd.compiler = FakeCompiler()
 
-        # build_libraries is also doing a bit of typoe checking
+        # build_libraries is also doing a bit of typo checking
         lib = [('name', {'sources': 'notvalid'})]
         self.assertRaises(DistutilsSetupError, cmd.build_libraries, lib)
 
index d2ab03801a47228a6adda8323ad07b382cdc75fd..9ce70905ed2f2f01d271c9ec486cacf00dce0c76 100644 (file)
@@ -35,7 +35,7 @@ class Mbox(object):
     """Mock for tkinter.messagebox with an Mbox_func for each function.
 
     This module was 'tkMessageBox' in 2.x; hence the 'import as' in  3.x.
-    Example usage in test_module.py for testing functios in module.py:
+    Example usage in test_module.py for testing functions in module.py:
     ---
 from idlelib.idle_test.mock_tk import Mbox
 import module
@@ -98,7 +98,7 @@ class Text(object):
 
         This implements .index without converting the result back to a string.
         The result is contrained by the number of lines and linelengths of
-        self.data. For many indexes, the result is initally (1, 0).
+        self.data. For many indexes, the result is initially (1, 0).
 
         The input index may have any of several possible forms:
         * line.char float: converted to 'line.char' string;
@@ -149,7 +149,7 @@ class Text(object):
 
        -1: position before terminal \n; for .insert(), .delete
        0: position after terminal \n; for .get, .delete index 1
-       1: same viewed as begininning of non-existent next line (for .index)
+       1: same viewed as beginning of non-existent next line (for .index)
        '''
         n = len(self.data)
         if endflag == 1:
@@ -271,7 +271,7 @@ class Text(object):
         "Scroll screen to make the character at INDEX is visible."
         pass
 
-    #  The following is a Misc method inheritet by Text.
+    #  The following is a Misc method inherited by Text.
     # It should properly go in a Misc mock, but is included here for now.
 
     def bind(sequence=None, func=None, add=None):
index fca9540e92cb5f8c82d6ba6c972351adf1a40c0e..7d7affc81ce8e995d8cde5f29aa03806c02d4133 100644 (file)
@@ -244,7 +244,7 @@ class FormatEventTest(unittest.TestCase):
     """Test the formatting of text inside a Text widget.
 
     This is done with FormatParagraph.format.paragraph_event,
-    which calls funtions in the module as appropriate.
+    which calls functions in the module as appropriate.
     """
     test_string = (
         "    '''this is a test of a reformat for a triple "
index 27f8a49ec600f9403ecaf67a212eaff6369aa555..067641b8f86f5f6b1a1c4b0a7742fc0f5ea861e1 100644 (file)
@@ -34,8 +34,8 @@ class FixItertools(fixer_base.BaseFix):
             # Remove the 'itertools'
             prefix = it.prefix
             it.remove()
-            # Replace the node wich contains ('.', 'function') with the
-            # function (to be consistant with the second part of the pattern)
+            # Replace the node which contains ('.', 'function') with the
+            # function (to be consistent with the second part of the pattern)
             dot.remove()
             func.parent.replace(func)
 
index c86fbeaab2c45c763f588ac350b8315ea380b7ae..4f5593c5feb0d6c7a455649473d679cf3c3e3bc6 100644 (file)
@@ -71,7 +71,7 @@ def fixup_parse_tree(cls_node):
 def fixup_simple_stmt(parent, i, stmt_node):
     """ if there is a semi-colon all the parts count as part of the same
         simple_stmt.  We just want the __metaclass__ part so we move
-        everything efter the semi-colon into its own simple_stmt node
+        everything after the semi-colon into its own simple_stmt node
     """
     for semi_ind, node in enumerate(stmt_node.children):
         if node.type == token.SEMI: # *sigh*
index 26023813516ec9249091e09402c441f4e5f18fff..f66cb6b3f87f30f3de59acb52c04a8fc9fdcc14e 100644 (file)
@@ -73,7 +73,7 @@ class TestRaiseChanges(GrammarTest):
         self.invalid_syntax("raise E from")
 
 
-# Adapated from Python 3's Lib/test/test_grammar.py:GrammarTests.testFuncdef
+# Adaptated from Python 3's Lib/test/test_grammar.py:GrammarTests.testFuncdef
 class TestFunctionAnnotations(GrammarTest):
     def test_1(self):
         self.validate("""def f(x) -> list: pass""")
index 8a39d59071b50db79ff8debb6ee32cbdad90268e..4c25f0005c83ece6302a7c61d32bd57046e9868a 100644 (file)
@@ -159,7 +159,8 @@ class RegressionTests(unittest.TestCase):
 
     def CheckCursorConstructorCallCheck(self):
         """
-        Verifies that cursor methods check wether base class __init__ was called.
+        Verifies that cursor methods check whether base class __init__ was
+        called.
         """
         class Cursor(sqlite.Cursor):
             def __init__(self, con):
@@ -177,7 +178,8 @@ class RegressionTests(unittest.TestCase):
 
     def CheckConnectionConstructorCallCheck(self):
         """
-        Verifies that connection methods check wether base class __init__ was called.
+        Verifies that connection methods check whether base class __init__ was
+        called.
         """
         class Connection(sqlite.Connection):
             def __init__(self, name):
index c5ab39bb77189ed2d81f67b09a42022e77f12285..400a4f24086620ac62ecbb0a89cdee5dc0ba66e9 100644 (file)
@@ -244,7 +244,7 @@ class DeclTypesTests(unittest.TestCase):
         self.assertEqual(type(value), float)
 
     def CheckNumber2(self):
-        """Checks wether converter names are cut off at '(' characters"""
+        """Checks whether converter names are cut off at '(' characters"""
         self.cur.execute("insert into test(n2) values (5)")
         value = self.cur.execute("select n2 from test").fetchone()[0]
         # if the converter is not used, it's an int instead of a float
index 1a1cac883c66ceceffc1348638a3ac86193e6ced..fe5a4f35e39ba061fda1940a9840aecee990057b 100644 (file)
@@ -184,7 +184,7 @@ def unload(name):
 
 if sys.platform.startswith("win"):
     def _waitfor(func, pathname, waitall=False):
-        # Peform the operation
+        # Perform the operation
         func(pathname)
         # Now setup the wait loop
         if waitall:
@@ -200,7 +200,7 @@ if sys.platform.startswith("win"):
         # required when contention occurs.
         timeout = 0.001
         while timeout < 1.0:
-            # Note we are only testing for the existance of the file(s) in
+            # Note we are only testing for the existence of the file(s) in
             # the contents of the directory regardless of any security or
             # access rights.  If we have made it this far, we have sufficient
             # permissions to do that much using Python's equivalent of the
index 3544a20f7cf376d4aa8fc40e298a167d23de1114..d8d52f7c0df1946dc43360659f07b6a92f52be1e 100644 (file)
@@ -324,7 +324,7 @@ class Test_TestLoader(unittest.TestCase):
     # Does loadTestsFromName raise TypeError when the `module` argument
     # isn't a module object?
     #
-    # XXX Accepts the not-a-module object, ignorning the object's type
+    # XXX Accepts the not-a-module object, ignoring the object's type
     # This should raise an exception or the method name should be changed
     #
     # XXX Some people are relying on this, so keep it for now