mirror of
https://github.com/django/django.git
synced 2025-11-20 03:30:00 +00:00
Fixed #23395 -- Limited line lengths to 119 characters.
This commit is contained in:
parent
84b0a8d2aa
commit
b1e33ceced
130 changed files with 5259 additions and 1501 deletions
|
|
@ -25,9 +25,13 @@ class OptimizerTests(SimpleTestCase):
|
|||
expected = [repr(f.deconstruct()) for f in expected]
|
||||
self.assertEqual(expected, result)
|
||||
if exact is not None and iterations != exact:
|
||||
raise self.failureException("Optimization did not take exactly %s iterations (it took %s)" % (exact, iterations))
|
||||
raise self.failureException(
|
||||
"Optimization did not take exactly %s iterations (it took %s)" % (exact, iterations)
|
||||
)
|
||||
if less_than is not None and iterations >= less_than:
|
||||
raise self.failureException("Optimization did not take less than %s iterations (it took %s)" % (less_than, iterations))
|
||||
raise self.failureException(
|
||||
"Optimization did not take less than %s iterations (it took %s)" % (less_than, iterations)
|
||||
)
|
||||
|
||||
def assertDoesNotOptimize(self, operations):
|
||||
self.assertOptimizesTo(operations, operations)
|
||||
|
|
@ -280,12 +284,16 @@ class OptimizerTests(SimpleTestCase):
|
|||
[
|
||||
migrations.CreateModel("Foo", [("name", models.CharField(max_length=255))]),
|
||||
migrations.CreateModel("LinkThrough", []),
|
||||
migrations.AddField("Foo", "link", models.ManyToManyField("migrations.Link", through="migrations.LinkThrough")),
|
||||
migrations.AddField(
|
||||
"Foo", "link", models.ManyToManyField("migrations.Link", through="migrations.LinkThrough")
|
||||
),
|
||||
],
|
||||
[
|
||||
migrations.CreateModel("Foo", [("name", models.CharField(max_length=255))]),
|
||||
migrations.CreateModel("LinkThrough", []),
|
||||
migrations.AddField("Foo", "link", models.ManyToManyField("migrations.Link", through="migrations.LinkThrough")),
|
||||
migrations.AddField(
|
||||
"Foo", "link", models.ManyToManyField("migrations.Link", through="migrations.LinkThrough")
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue