diff options
| author | django-bot <ops@djangoproject.com> | 2022-02-03 20:24:19 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-07 20:37:05 +0100 |
| commit | 9c19aff7c7561e3a82978a272ecdaad40dda5c00 (patch) | |
| tree | f0506b668a013d0063e5fba3dbf4863b466713ba /tests/model_fields/test_floatfield.py | |
| parent | f68fa8b45dfac545cfc4111d4e52804c86db68d3 (diff) | |
Refs #33476 -- Reformatted code with Black.
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): |
