diff options
| author | django-bot <ops@djangoproject.com> | 2025-07-22 20:41:41 -0700 |
|---|---|---|
| committer | nessita <124304+nessita@users.noreply.github.com> | 2025-07-23 20:17:55 -0300 |
| commit | 69a93a88edb56ba47f624dac7a21aacc47ea474f (patch) | |
| tree | f57507a4435d032493cae40e06ecb254790b67b2 /tests/model_inheritance | |
| parent | 55b0cc21310b76ce4018dd793ba50556eaf0af06 (diff) | |
Refs #36500 -- Rewrapped long docstrings and block comments via a script.
Rewrapped long docstrings and block comments to 79 characters + newline
using script from https://github.com/medmunds/autofix-w505.
Diffstat (limited to 'tests/model_inheritance')
| -rw-r--r-- | tests/model_inheritance/test_abstract_inheritance.py | 3 | ||||
| -rw-r--r-- | tests/model_inheritance/tests.py | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/tests/model_inheritance/test_abstract_inheritance.py b/tests/model_inheritance/test_abstract_inheritance.py index 9b9da437da..2dd183a200 100644 --- a/tests/model_inheritance/test_abstract_inheritance.py +++ b/tests/model_inheritance/test_abstract_inheritance.py @@ -61,7 +61,8 @@ class AbstractInheritanceTests(SimpleTestCase): def test_diamond_shaped_multiple_inheritance_is_depth_first(self): """ In contrast to standard Python MRO, resolution of inherited fields is - strictly depth-first, rather than breadth-first in diamond-shaped cases. + strictly depth-first, rather than breadth-first in diamond-shaped + cases. This is because a copy of the parent field descriptor is placed onto the model class in ModelBase.__new__(), rather than the attribute diff --git a/tests/model_inheritance/tests.py b/tests/model_inheritance/tests.py index cc333a9ac2..2b911d4dc5 100644 --- a/tests/model_inheritance/tests.py +++ b/tests/model_inheritance/tests.py @@ -81,7 +81,8 @@ class ModelInheritanceTests(TestCase): Restaurant.objects.filter(supplier__name="foo") def test_model_with_distinct_accessors(self): - # The Post model has distinct accessors for the Comment and Link models. + # The Post model has distinct accessors for the Comment and Link + # models. post = Post.objects.create(title="Lorem Ipsum") post.attached_comment_set.create(content="Save $ on V1agr@", is_spam=True) post.attached_link_set.create( @@ -194,7 +195,8 @@ class ModelInheritanceTests(TestCase): with CaptureQueriesContext(connection) as captured_queries: Place.objects.filter(pk=supplier.pk).update(name=supplier.name) expected_sql = captured_queries[0]["sql"] - # Capture the queries executed when a subclassed model instance is saved. + # Capture the queries executed when a subclassed model instance is + # saved. with CaptureQueriesContext(connection) as captured_queries: supplier.save(update_fields=("name",)) for query in captured_queries: |
