diff --git a/bottle.py b/bottle.py index 053f9b41..848618b2 100755 --- a/bottle.py +++ b/bottle.py @@ -749,7 +749,7 @@ def mount(self, prefix, app, **options): application, install them separately. While it is possible to use path wildcards within the prefix path - (:class:`Bottle` childs only), it is highly discouraged. + (:class:`Bottle` children only), it is highly discouraged. The prefix path must end with a slash. If you want to access the root of the child application via `/prefix` in addition to @@ -2472,7 +2472,7 @@ def _make_overlay(self): approach does not resolve missing keys on demand, but instead actively copies all values from the source to the overlay and keeps track of virtual and non-virtual keys internally. This removes any - lookup-overhead. Read-access is as fast as a build-in dict for both + lookup-overhead. Read-access is as fast as a built-in dict for both virtual and non-virtual keys. Changes are propagated recursively and depth-first. A failing @@ -3198,7 +3198,7 @@ def parse(self): separator = b"--" + tob(self.boundary) terminator = separator + b"--" mem_used, disk_used = 0, 0 # Track used resources to prevent DoS - is_tail = False # True if the last line was incomplete (cutted) + is_tail = False # True if the last line was incomplete (cut) # Consume first boundary. Ignore any preamble, as required by RFC # 2046, section 5.1.1. diff --git a/test/test_config.py b/test/test_config.py index d5522739..e508fbaf 100644 --- a/test/test_config.py +++ b/test/test_config.py @@ -7,7 +7,7 @@ class TestConfDict(unittest.TestCase): def test_isadict(self): """ ConfigDict should behaves like a normal dict. """ - # It is a dict-subclass, so this kind of pointless, but it doen't hurt. + # It is a dict-subclass, so this kind of pointless, but it doesn't hurt. d, m = dict(), ConfigDict() d['key'], m['key'] = 'value', 'value' d['k2'], m['k2'] = 'v1', 'v1' @@ -115,7 +115,7 @@ def test_overlay(self): self.assertEqual(intermediate['key'], 'source2') self.assertEqual(overlay['key'], 'overlay') - # Deleting an overlayed key restores the value from source + # Deleting an overlaid key restores the value from source del overlay['key'] self.assertEqual(source['key'], 'source2') self.assertEqual(overlay['key'], 'source2') @@ -149,7 +149,7 @@ def test_overlay(self): self.assertEqual(intermediate['key3'], 'source') self.assertEqual(overlay['key3'], 'overlay') - # But as soon as the overlayed key is deleted, it gets the + # But as soon as the overlaid key is deleted, it gets the # copy from the source del overlay['key3'] self.assertEqual(source['key3'], 'source') diff --git a/test/test_environ.py b/test/test_environ.py index c6082ccf..71e7c1bf 100755 --- a/test/test_environ.py +++ b/test/test_environ.py @@ -318,7 +318,7 @@ def test_chunked_not_chunked_at_all(self): self._test_chunked('abcdef', HTTPError) def test_multipart(self): - """ Environ: POST (multipart files and multible values per key) """ + """ Environ: POST (multipart files and multiple values per key) """ fields = [('field1','value1'), ('field2','value2'), ('field2','万难')] files = [('file1','filename1.txt','content1'), ('万难','万难foo.py', 'ä\nö\rü')] e = tools.multipart_environ(fields=fields, files=files) diff --git a/test/test_formsdict.py b/test/test_formsdict.py index 21489974..6ef68536 100644 --- a/test/test_formsdict.py +++ b/test/test_formsdict.py @@ -6,12 +6,12 @@ class TestFormsDict(unittest.TestCase): def test_attr_access(self): - """ FomsDict.attribute returs string values as unicode. """ + """ FomsDict.attribute returns string values as unicode. """ d = FormsDict(py3='瓶') self.assertEqual('瓶', d.py3) self.assertEqual('瓶', d["py3"]) def test_attr_missing(self): - """ FomsDict.attribute returs u'' on missing keys. """ + """ FomsDict.attribute returns u'' on missing keys. """ d = FormsDict() self.assertEqual('', d.missing) diff --git a/test/test_multipart.py b/test/test_multipart.py index a1ecab1a..9ed525df 100644 --- a/test/test_multipart.py +++ b/test/test_multipart.py @@ -127,7 +127,7 @@ def test_big_file(self): part.close() def test_file_seek(self): - ''' The file object should be readable withoud a seek(0). ''' + ''' The file object should be readable without a seek(0). ''' test_file = 'abc'*1024 boundary = '---------------------------186454651713519341951581030105' request = BytesIO(bottle.tob('\r\n').join(map(bottle.tob,[ diff --git a/test/test_stpl.py b/test/test_stpl.py index 73f37d32..587b7b6b 100755 --- a/test/test_stpl.py +++ b/test/test_stpl.py @@ -103,7 +103,7 @@ def test_newline_in_parameterlist(self): self.assertRenders("%a=[1,\n%2]\n{{len(a)}}", "2") def test_dedentbug(self): - ''' One-Line dednet blocks should not change indention ''' + ''' One-Line dednet blocks should not change indentation ''' t = '%if x: a="if"\n%else: a="else"\n%end\n{{a}}' self.assertRenders(t, "if", x=True) self.assertRenders(t, "else", x=False) @@ -114,7 +114,7 @@ def test_dedentbug(self): self.assertRaises(NameError, t.render) def test_onelinebugs(self): - ''' One-Line blocks should not change indention ''' + ''' One-Line blocks should not change indentation ''' t = '%if x:\n%a=1\n%end\n{{a}}' self.assertRenders(t, "1", x=True) t = '%if x: a=1; end\n{{a}}' @@ -299,7 +299,7 @@ def test_multiline_find_eob_in_comments(self): ''' self.assertRenders(source, result) - def test_multiline_indention(self): + def test_multiline_indentation(self): source = ''' <% if True: a = 2