diff options
| author | django-bot <ops@djangoproject.com> | 2022-02-08 12:09:55 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-08 12:15:38 +0100 |
| commit | 6a682b38e75d4c975b4c4493565a59f1bc14397c (patch) | |
| tree | 0bd9cda550bea26238656d9f120d769e8b41bb9e /tests/model_fields/test_floatfield.py | |
| parent | e73ce08888e6f34d3f050377cfd2fbb733be94a9 (diff) | |
[4.0.x] Refs #33476 -- Reformatted code with Black.
Backport of 9c19aff7c7561e3a82978a272ecdaad40dda5c00 from main.
Diffstat (limited to 'tests/model_fields/test_floatfield.py')
| -rw-r--r-- | tests/model_fields/test_floatfield.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/model_fields/test_floatfield.py b/tests/model_fields/test_floatfield.py index 856197cd6e..264b5677e9 100644 --- a/tests/model_fields/test_floatfield.py +++ b/tests/model_fields/test_floatfield.py @@ -5,7 +5,6 @@ from .models import FloatModel class TestFloatField(TestCase): - def test_float_validates_object(self): instance = FloatModel(size=2.5) # Try setting float field to unsaved object @@ -20,8 +19,8 @@ class TestFloatField(TestCase): # Set field to object on saved instance instance.size = instance msg = ( - 'Tried to update field model_fields.FloatModel.size with a model ' - 'instance, %r. Use a value compatible with FloatField.' + "Tried to update field model_fields.FloatModel.size with a model " + "instance, %r. Use a value compatible with FloatField." ) % instance with transaction.atomic(): with self.assertRaisesMessage(TypeError, msg): @@ -40,8 +39,8 @@ class TestFloatField(TestCase): (TypeError, set()), (TypeError, object()), (TypeError, complex()), - (ValueError, 'non-numeric string'), - (ValueError, b'non-numeric byte-string'), + (ValueError, "non-numeric string"), + (ValueError, b"non-numeric byte-string"), ] for exception, value in tests: with self.subTest(value): |
