Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions bottle.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions test/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion test/test_environ.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions test/test_formsdict.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion test/test_multipart.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,[
Expand Down
6 changes: 3 additions & 3 deletions test/test_stpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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}}'
Expand Down Expand Up @@ -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
Expand Down