summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCollin Anderson <cmawebsite@gmail.com>2015-02-05 13:25:34 -0500
committerTim Graham <timograham@gmail.com>2015-02-06 09:35:08 -0500
commitfc8e1e0c107fe5fc8c82f01dfabfa9b7a196a67c (patch)
tree2479a9a9fdc399e9ec6d640d9eaca191e66e6c6c /tests
parent232a1d297c8431a77f3dbb9bcf453d17eb5e3315 (diff)
[1.8.x] Fixed E265 comment style
Backport of db77915c9fd35a203edd8206f702ee4082f04d4a from master
Diffstat (limited to 'tests')
-rw-r--r--tests/backends/tests.py14
-rw-r--r--tests/httpwrappers/tests.py2
-rw-r--r--tests/introspection/tests.py2
-rw-r--r--tests/migrations/test_commands.py2
-rw-r--r--tests/model_fields/models.py2
-rw-r--r--tests/model_forms/tests.py4
-rw-r--r--tests/model_regress/models.py4
-rw-r--r--tests/prefetch_related/models.py14
-rw-r--r--tests/serializers_regress/tests.py2
-rw-r--r--tests/syndication_tests/tests.py1
-rw-r--r--tests/urlpatterns_reverse/no_urls.py1
11 files changed, 23 insertions, 25 deletions
diff --git a/tests/backends/tests.py b/tests/backends/tests.py
index 979ebefa01..983073a25f 100644
--- a/tests/backends/tests.py
+++ b/tests/backends/tests.py
@@ -464,7 +464,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]
@@ -502,7 +502,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)
@@ -511,13 +511,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)
@@ -530,14 +530,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)
@@ -558,7 +558,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 14ad306c65..8bc3302afc 100644
--- a/tests/httpwrappers/tests.py
+++ b/tests/httpwrappers/tests.py
@@ -345,7 +345,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 cc6b33e572..c6c230b9c5 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 0f86289cff..8f6c574600 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 2c6b707b88..f8ce329e7b 100644
--- a/tests/model_fields/models.py
+++ b/tests/model_fields/models.py
@@ -166,7 +166,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.IPAddressField("verbose field13")
field14 = models.GenericIPAddressField("verbose field14", protocol="ipv4")
diff --git a/tests/model_forms/tests.py b/tests/model_forms/tests.py
index 4bb7c47eb2..c7acf948a7 100644
--- a/tests/model_forms/tests.py
+++ b/tests/model_forms/tests.py
@@ -955,10 +955,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 c42b0f0d35..0798069043 100644
--- a/tests/model_regress/models.py
+++ b/tests/model_regress/models.py
@@ -29,7 +29,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)
@@ -73,7 +73,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 40540e9b26..c4adb00877 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 2c99ed77b3..0c07b3162c 100644
--- a/tests/serializers_regress/tests.py
+++ b/tests/serializers_regress/tests.py
@@ -241,7 +241,7 @@ test_data = [
(data_obj, 81, IntegerData, -123456789),
(data_obj, 82, IntegerData, 0),
(data_obj, 83, IntegerData, None),
- #(XX, ImageData
+ # (XX, ImageData
(data_obj, 90, IPAddressData, "127.0.0.1"),
(data_obj, 91, IPAddressData, None),
(data_obj, 95, GenericIPAddressData, "fe80:1424:2223:6cff:fe8a:2e8a:2151:abcd"),
diff --git a/tests/syndication_tests/tests.py b/tests/syndication_tests/tests.py
index 63638fa589..221d4c112e 100644
--- a/tests/syndication_tests/tests.py
+++ b/tests/syndication_tests/tests.py
@@ -94,7 +94,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