Fixed #25668 -- Misc spelling errors

This commit is contained in:
Ville Skyttä 2015-11-03 11:55:10 +02:00
parent a10cbbbc17
commit 3ee18400ae
12 changed files with 18 additions and 18 deletions

View File

@ -259,7 +259,7 @@ class BaseCache(object):
return version + delta
def decr_version(self, key, delta=1, version=None):
"""Substracts delta from the cache version for the supplied key. Returns
"""Subtracts delta from the cache version for the supplied key. Returns
the new version.
"""
return self.incr_version(key, -delta, version)

View File

@ -966,7 +966,7 @@ class TestCase(TransactionTestCase):
Similar to TransactionTestCase, but uses `transaction.atomic()` to achieve
test isolation.
In most situation, TestCase should be prefered to TransactionTestCase as
In most situations, TestCase should be preferred to TransactionTestCase as
it allows faster execution. However, there are some situations where using
TransactionTestCase might be necessary (e.g. testing some transactional
behavior).

View File

@ -223,7 +223,7 @@ def escape_uri_path(path):
# reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | ","
# unreserved = alphanum | mark
# mark = "-" | "_" | "." | "!" | "~" | "*" | "'" | "(" | ")"
# The list of safe characters here is constructed substracting ";", "=",
# The list of safe characters here is constructed subtracting ";", "=",
# and "?" according to section 3.3 of RFC 2396.
# The reason for not subtracting and escaping "/" is that we are escaping
# the entire path, not a path segment.

View File

@ -144,7 +144,7 @@ DEFAULT_PALETTE = DARK_PALETTE
def parse_color_setting(config_string):
"""Parse a DJANGO_COLORS environment variable to produce the system palette
The general form of a pallete definition is:
The general form of a palette definition is:
"palette;role=fg;role=fg/bg;role=fg,option,option;role=fg/bg,option,option"
@ -156,7 +156,7 @@ def parse_color_setting(config_string):
option is a display options.
Specifying a named palette is the same as manually specifying the individual
definitions for each role. Any individual definitions following the pallete
definitions for each role. Any individual definitions following the palette
definition will augment the base palette definition.
Valid roles:

View File

@ -186,7 +186,7 @@ class UtilsTests(SimpleTestCase):
self.assertEqual(display_value, '12345')
@override_settings(USE_L10N=True, USE_THOUSAND_SEPARATOR=True)
def test_number_formats_with_thousand_seperator_display_for_field(self):
def test_number_formats_with_thousand_separator_display_for_field(self):
display_value = display_for_field(12345.6789, models.FloatField(), self.empty_value)
self.assertEqual(display_value, '12,345.6789')

View File

@ -136,7 +136,7 @@ class FunctionTests(TestCase):
self.assertEqual(articles.first().last_updated, now)
@skipIfDBFeature('greatest_least_ignores_nulls')
def test_greatest_propogates_null(self):
def test_greatest_propagates_null(self):
now = timezone.now()
Article.objects.create(title="Testing with Django", written=now)
@ -231,7 +231,7 @@ class FunctionTests(TestCase):
self.assertEqual(articles.first().first_updated, now)
@skipIfDBFeature('greatest_least_ignores_nulls')
def test_least_propogates_null(self):
def test_least_propagates_null(self):
now = timezone.now()
Article.objects.create(title="Testing with Django", written=now)

View File

@ -292,7 +292,7 @@ class MultiColumnFKTests(TestCase):
self.assertQuerysetEqual(self.jane.friends.all(), [])
def test_prefetch_related_m2m_foward_works(self):
def test_prefetch_related_m2m_forward_works(self):
Membership.objects.create(membership_country=self.usa, person=self.bob, group=self.cia)
Membership.objects.create(membership_country=self.usa, person=self.jim, group=self.democrat)

View File

@ -143,7 +143,7 @@ class ExtractorTests(SerializeMixin, SimpleTestCase):
None can be passed for the line_number argument to skip checking of
the :42 suffix part.
A string token can also be pased as line_number, in which case it
A string token can also be passed as line_number, in which case it
will be searched in the template, and its line number will be used.
A msgid is a suitable candidate.
"""

View File

@ -1750,7 +1750,7 @@ class LocaleMiddlewareTests(TestCase):
LANGUAGES=[
('bg', 'Bulgarian'),
('en-us', 'English'),
('pt-br', 'Portugese (Brazil)'),
('pt-br', 'Portuguese (Brazil)'),
],
MIDDLEWARE_CLASSES=[
'django.middleware.locale.LocaleMiddleware',

View File

@ -181,7 +181,7 @@ class AssertContainsTests(SimpleTestCase):
self.assertNotContains(r, ugettext_lazy('never'))
def test_assert_contains_renders_template_response(self):
""" Test that we can pass in an unrendered SimpleTemplateReponse
""" Test that we can pass in an unrendered SimpleTemplateResponse
without throwing an error.
Refs #15826.
"""
@ -198,7 +198,7 @@ class AssertContainsTests(SimpleTestCase):
self.assertContains(response, 'Hello')
def test_assert_not_contains_renders_template_response(self):
""" Test that we can pass in an unrendered SimpleTemplateReponse
""" Test that we can pass in an unrendered SimpleTemplateResponse
without throwing an error.
Refs #15826.
"""

View File

@ -676,7 +676,7 @@ class SerializationTests(SimpleTestCase):
# Backend-specific notes:
# - JSON supports only milliseconds, microseconds will be truncated.
# - PyYAML dumps the UTC offset correctly for timezone-aware datetimes,
# but when it loads this representation, it substracts the offset and
# but when it loads this representation, it subtracts the offset and
# returns a naive datetime object in UTC (http://pyyaml.org/ticket/202).
# Tests are adapted to take these quirks into account.

View File

@ -760,20 +760,20 @@ class NamespaceTests(SimpleTestCase):
"current_app should either match the whole path or shouldn't be used"
self.assertEqual(
'/ns-included1/test4/inner/',
reverse('inc-ns1:testapp:urlobject-view', current_app='non-existant:test-ns3')
reverse('inc-ns1:testapp:urlobject-view', current_app='non-existent:test-ns3')
)
self.assertEqual(
'/ns-included1/test4/inner/37/42/',
reverse('inc-ns1:testapp:urlobject-view', args=[37, 42], current_app='non-existant:test-ns3')
reverse('inc-ns1:testapp:urlobject-view', args=[37, 42], current_app='non-existent:test-ns3')
)
self.assertEqual(
'/ns-included1/test4/inner/42/37/',
reverse('inc-ns1:testapp:urlobject-view', kwargs={'arg1': 42, 'arg2': 37},
current_app='non-existant:test-ns3')
current_app='non-existent:test-ns3')
)
self.assertEqual(
'/ns-included1/test4/inner/+%5C$*/',
reverse('inc-ns1:testapp:urlobject-special-view', current_app='non-existant:test-ns3')
reverse('inc-ns1:testapp:urlobject-special-view', current_app='non-existent:test-ns3')
)