diff --git a/django/core/cache/backends/base.py b/django/core/cache/backends/base.py index 7835c9793a..186a45ddd6 100644 --- a/django/core/cache/backends/base.py +++ b/django/core/cache/backends/base.py @@ -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) diff --git a/django/test/testcases.py b/django/test/testcases.py index 302c284edb..6b31e974e3 100644 --- a/django/test/testcases.py +++ b/django/test/testcases.py @@ -991,7 +991,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). diff --git a/django/utils/encoding.py b/django/utils/encoding.py index 48fde393a7..6bc285d899 100644 --- a/django/utils/encoding.py +++ b/django/utils/encoding.py @@ -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. diff --git a/django/utils/termcolors.py b/django/utils/termcolors.py index 507b25dd77..4924918e25 100644 --- a/django/utils/termcolors.py +++ b/django/utils/termcolors.py @@ -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: diff --git a/tests/admin_utils/tests.py b/tests/admin_utils/tests.py index 7fb490dd2a..069433fd7d 100644 --- a/tests/admin_utils/tests.py +++ b/tests/admin_utils/tests.py @@ -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') diff --git a/tests/db_functions/tests.py b/tests/db_functions/tests.py index c18a4b25af..b5f4114aea 100644 --- a/tests/db_functions/tests.py +++ b/tests/db_functions/tests.py @@ -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) diff --git a/tests/foreign_object/tests.py b/tests/foreign_object/tests.py index 5188645325..90d7b34721 100644 --- a/tests/foreign_object/tests.py +++ b/tests/foreign_object/tests.py @@ -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) diff --git a/tests/i18n/test_extraction.py b/tests/i18n/test_extraction.py index e26ec29e43..f72aa00771 100644 --- a/tests/i18n/test_extraction.py +++ b/tests/i18n/test_extraction.py @@ -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. """ diff --git a/tests/i18n/tests.py b/tests/i18n/tests.py index 08ed5abe86..33430e87ef 100644 --- a/tests/i18n/tests.py +++ b/tests/i18n/tests.py @@ -1746,7 +1746,7 @@ class LocaleMiddlewareTests(TestCase): LANGUAGES=[ ('bg', 'Bulgarian'), ('en-us', 'English'), - ('pt-br', 'Portugese (Brazil)'), + ('pt-br', 'Portuguese (Brazil)'), ], MIDDLEWARE_CLASSES=[ 'django.middleware.locale.LocaleMiddleware', diff --git a/tests/test_client_regress/tests.py b/tests/test_client_regress/tests.py index 500c28f9ae..cff52024dc 100644 --- a/tests/test_client_regress/tests.py +++ b/tests/test_client_regress/tests.py @@ -183,7 +183,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. """ @@ -200,7 +200,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. """ diff --git a/tests/timezones/tests.py b/tests/timezones/tests.py index 7f550baf6c..57c71d995c 100644 --- a/tests/timezones/tests.py +++ b/tests/timezones/tests.py @@ -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. diff --git a/tests/urlpatterns_reverse/tests.py b/tests/urlpatterns_reverse/tests.py index 5f06cc7fed..2225fe8106 100644 --- a/tests/urlpatterns_reverse/tests.py +++ b/tests/urlpatterns_reverse/tests.py @@ -771,20 +771,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') )