diff options
| author | Collin Anderson <cmawebsite@gmail.com> | 2015-02-05 13:25:34 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-02-06 09:30:35 -0500 |
| commit | db77915c9fd35a203edd8206f702ee4082f04d4a (patch) | |
| tree | 4e97bb2cba7f08dc080992e266e18e9a9c9cc5f5 /tests | |
| parent | eb45a29565fe006b87657e9ee24054c66a6474f9 (diff) | |
Fixed E265 comment style
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/backends/tests.py | 14 | ||||
| -rw-r--r-- | tests/httpwrappers/tests.py | 2 | ||||
| -rw-r--r-- | tests/introspection/tests.py | 2 | ||||
| -rw-r--r-- | tests/migrations/test_commands.py | 2 | ||||
| -rw-r--r-- | tests/model_fields/models.py | 2 | ||||
| -rw-r--r-- | tests/model_forms/tests.py | 4 | ||||
| -rw-r--r-- | tests/model_regress/models.py | 4 | ||||
| -rw-r--r-- | tests/prefetch_related/models.py | 14 | ||||
| -rw-r--r-- | tests/serializers_regress/tests.py | 2 | ||||
| -rw-r--r-- | tests/syndication_tests/tests.py | 1 | ||||
| -rw-r--r-- | tests/urlpatterns_reverse/no_urls.py | 1 |
11 files changed, 23 insertions, 25 deletions
diff --git a/tests/backends/tests.py b/tests/backends/tests.py index a9f8f26618..8762d263b9 100644 --- a/tests/backends/tests.py +++ b/tests/backends/tests.py @@ -467,7 +467,7 @@ class EscapingChecks(TestCase): @unittest.skipUnless(connection.vendor == 'sqlite', "This is an sqlite-specific issue") def test_sqlite_parameter_escaping(self): - #13648: '%s' escaping support for sqlite3 + # '%s' escaping support for sqlite3 #13648 cursor = connection.cursor() cursor.execute("select strftime('%s', date('now'))") response = cursor.fetchall()[0][0] @@ -505,7 +505,7 @@ class BackendTestCase(TransactionTestCase): cursor.execute(query, args) def test_cursor_executemany(self): - #4896: Test cursor.executemany + # Test cursor.executemany #4896 args = [(i, i ** 2) for i in range(-5, 6)] self.create_squares_with_executemany(args) self.assertEqual(models.Square.objects.count(), 11) @@ -514,13 +514,13 @@ class BackendTestCase(TransactionTestCase): self.assertEqual(square.square, i ** 2) def test_cursor_executemany_with_empty_params_list(self): - #4765: executemany with params=[] does nothing + # Test executemany with params=[] does nothing #4765 args = [] self.create_squares_with_executemany(args) self.assertEqual(models.Square.objects.count(), 0) def test_cursor_executemany_with_iterator(self): - #10320: executemany accepts iterators + # Test executemany accepts iterators #10320 args = iter((i, i ** 2) for i in range(-3, 2)) self.create_squares_with_executemany(args) self.assertEqual(models.Square.objects.count(), 5) @@ -533,14 +533,14 @@ class BackendTestCase(TransactionTestCase): @skipUnlessDBFeature('supports_paramstyle_pyformat') def test_cursor_execute_with_pyformat(self): - #10070: Support pyformat style passing of parameters + # Support pyformat style passing of parameters #10070 args = {'root': 3, 'square': 9} self.create_squares(args, 'pyformat', multiple=False) self.assertEqual(models.Square.objects.count(), 1) @skipUnlessDBFeature('supports_paramstyle_pyformat') def test_cursor_executemany_with_pyformat(self): - #10070: Support pyformat style passing of parameters + # Support pyformat style passing of parameters #10070 args = [{'root': i, 'square': i ** 2} for i in range(-5, 6)] self.create_squares(args, 'pyformat', multiple=True) self.assertEqual(models.Square.objects.count(), 11) @@ -561,7 +561,7 @@ class BackendTestCase(TransactionTestCase): self.assertEqual(models.Square.objects.count(), 9) def test_unicode_fetches(self): - #6254: fetchone, fetchmany, fetchall return strings as unicode objects + # fetchone, fetchmany, fetchall return strings as unicode objects #6254 qn = connection.ops.quote_name models.Person(first_name="John", last_name="Doe").save() models.Person(first_name="Jane", last_name="Doe").save() diff --git a/tests/httpwrappers/tests.py b/tests/httpwrappers/tests.py index bea1c50b7e..da371dc74b 100644 --- a/tests/httpwrappers/tests.py +++ b/tests/httpwrappers/tests.py @@ -346,7 +346,7 @@ class HttpResponseTests(unittest.TestCase): # test odd inputs r = HttpResponse() r.content = ['1', '2', 3, '\u079e'] - #'\xde\x9e' == unichr(1950).encode('utf-8') + # '\xde\x9e' == unichr(1950).encode('utf-8') self.assertEqual(r.content, b'123\xde\x9e') # .content can safely be accessed multiple times. diff --git a/tests/introspection/tests.py b/tests/introspection/tests.py index 1280c13fe0..df0072ad92 100644 --- a/tests/introspection/tests.py +++ b/tests/introspection/tests.py @@ -30,7 +30,7 @@ class IntrospectionTests(TransactionTestCase): "django_table_names() returned a non-Django table") def test_django_table_names_retval_type(self): - #15216 - Table name is a list + # Table name is a list #15216 tl = connection.introspection.django_table_names(only_existing=True) self.assertIs(type(tl), list) tl = connection.introspection.django_table_names(only_existing=False) diff --git a/tests/migrations/test_commands.py b/tests/migrations/test_commands.py index d69936636b..95defa61f8 100644 --- a/tests/migrations/test_commands.py +++ b/tests/migrations/test_commands.py @@ -360,7 +360,7 @@ class MakeMigrationsTests(MigrationTestBase): self.assertIn('\\u201c\\xd0j\\xe1\\xf1g\\xf3\\u201d', content) # title.default def test_failing_migration(self): - #21280 - If a migration fails to serialize, it shouldn't generate an empty file. + # If a migration fails to serialize, it shouldn't generate an empty file. #21280 apps.register_model('migrations', UnserializableModel) with six.assertRaisesRegex(self, ValueError, r'Cannot serialize'): diff --git a/tests/model_fields/models.py b/tests/model_fields/models.py index ee2f807146..40499b0f8c 100644 --- a/tests/model_fields/models.py +++ b/tests/model_fields/models.py @@ -168,7 +168,7 @@ class VerboseNameField(models.Model): field10 = models.FilePathField("verbose field10") field11 = models.FloatField("verbose field11") # Don't want to depend on Pillow in this test - #field_image = models.ImageField("verbose field") + # field_image = models.ImageField("verbose field") field12 = models.IntegerField("verbose field12") field13 = models.GenericIPAddressField("verbose field13", protocol="ipv4") field14 = models.NullBooleanField("verbose field14") diff --git a/tests/model_forms/tests.py b/tests/model_forms/tests.py index 82fc0925d0..f1cf77a6a6 100644 --- a/tests/model_forms/tests.py +++ b/tests/model_forms/tests.py @@ -961,10 +961,10 @@ class ModelToDictTests(TestCase): with self.assertNumQueries(0): d = model_to_dict(art) - #Ensure all many-to-many categories appear in model_to_dict + # Ensure all many-to-many categories appear in model_to_dict for c in categories: self.assertIn(c.pk, d['categories']) - #Ensure many-to-many relation appears as a list + # Ensure many-to-many relation appears as a list self.assertIsInstance(d['categories'], list) diff --git a/tests/model_regress/models.py b/tests/model_regress/models.py index b899baf6ea..d4c769af55 100644 --- a/tests/model_regress/models.py +++ b/tests/model_regress/models.py @@ -28,7 +28,7 @@ class Article(models.Model): class Movie(models.Model): - #5218: Test models with non-default primary keys / AutoFields + # Test models with non-default primary keys / AutoFields #5218 movie_id = models.AutoField(primary_key=True) name = models.CharField(max_length=60) @@ -72,7 +72,7 @@ class NonAutoPK(models.Model): name = models.CharField(max_length=10, primary_key=True) -#18432: Chained foreign keys with to_field produce incorrect query +# Chained foreign keys with to_field produce incorrect query #18432 class Model1(models.Model): pkey = models.IntegerField(unique=True, db_index=True) diff --git a/tests/prefetch_related/models.py b/tests/prefetch_related/models.py index 9961fd15ae..bfc0ae0217 100644 --- a/tests/prefetch_related/models.py +++ b/tests/prefetch_related/models.py @@ -6,7 +6,7 @@ from django.db import models from django.utils.encoding import python_2_unicode_compatible -## Basic tests +# Basic tests @python_2_unicode_compatible class Author(models.Model): @@ -88,7 +88,7 @@ class BookReview(models.Model): notes = models.TextField(null=True, blank=True) -## Models for default manager tests +# Models for default manager tests class Qualification(models.Model): name = models.CharField(max_length=10) @@ -124,7 +124,7 @@ class Department(models.Model): ordering = ['id'] -## GenericRelation/GenericForeignKey tests +# GenericRelation/GenericForeignKey tests @python_2_unicode_compatible class TaggedItem(models.Model): @@ -172,7 +172,7 @@ class Comment(models.Model): ordering = ['id'] -## Models for lookup ordering tests +# Models for lookup ordering tests class House(models.Model): name = models.CharField(max_length=50) @@ -209,7 +209,7 @@ class Person(models.Model): ordering = ['id'] -## Models for nullable FK tests +# Models for nullable FK tests @python_2_unicode_compatible class Employee(models.Model): @@ -224,7 +224,7 @@ class Employee(models.Model): ordering = ['id'] -## Ticket #19607 +# Ticket #19607 @python_2_unicode_compatible class LessonEntry(models.Model): @@ -244,7 +244,7 @@ class WordEntry(models.Model): return "%s (%s)" % (self.name, self.id) -## Ticket #21410: Regression when related_name="+" +# Ticket #21410: Regression when related_name="+" @python_2_unicode_compatible class Author2(models.Model): diff --git a/tests/serializers_regress/tests.py b/tests/serializers_regress/tests.py index 1bd8469641..3653ffcf41 100644 --- a/tests/serializers_regress/tests.py +++ b/tests/serializers_regress/tests.py @@ -240,7 +240,7 @@ test_data = [ (data_obj, 81, IntegerData, -123456789), (data_obj, 82, IntegerData, 0), (data_obj, 83, IntegerData, None), - #(XX, ImageData + # (XX, ImageData (data_obj, 95, GenericIPAddressData, "fe80:1424:2223:6cff:fe8a:2e8a:2151:abcd"), (data_obj, 96, GenericIPAddressData, None), (data_obj, 100, NullBooleanData, True), diff --git a/tests/syndication_tests/tests.py b/tests/syndication_tests/tests.py index 6e08d719d4..1b03d3b192 100644 --- a/tests/syndication_tests/tests.py +++ b/tests/syndication_tests/tests.py @@ -93,7 +93,6 @@ class SyndicationFeedTest(FeedTestCase): 'link': 'http://example.com/blog/', 'language': 'en', 'lastBuildDate': last_build_date, - #'atom:link': '', 'ttl': '600', 'copyright': 'Copyright (c) 2007, Sally Smith', }) diff --git a/tests/urlpatterns_reverse/no_urls.py b/tests/urlpatterns_reverse/no_urls.py index 1cd34c78f7..e69de29bb2 100644 --- a/tests/urlpatterns_reverse/no_urls.py +++ b/tests/urlpatterns_reverse/no_urls.py @@ -1 +0,0 @@ -#from django.conf.urls import patterns, url, include |
