Skip to content

Commit 565a9db

Browse files
committed
fix: type in test
1 parent ceec85c commit 565a9db

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

tests/test_json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def test_int(input_value, expected):
9090
('"123.4"', 123.4),
9191
('"123.0"', 123.0),
9292
('"123"', 123.0),
93-
('"string"', Err('Input should be a valid number, unable to parse string as an number [type=float_parsing,')),
93+
('"string"', Err('Input should be a valid number, unable to parse string as a number [type=float_parsing,')),
9494
],
9595
)
9696
def test_float(input_value, expected):

tests/test_misc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class MyModel:
126126
{
127127
'type': 'float_parsing',
128128
'loc': ('x',),
129-
'msg': 'Input should be a valid number, unable to parse string as an number',
129+
'msg': 'Input should be a valid number, unable to parse string as a number',
130130
'input': 'x' * 60,
131131
},
132132
{
@@ -139,7 +139,7 @@ class MyModel:
139139
assert repr(exc_info.value) == (
140140
'2 validation errors for MyModel\n'
141141
'x\n'
142-
' Input should be a valid number, unable to parse string as an number '
142+
' Input should be a valid number, unable to parse string as a number '
143143
"[type=float_parsing, input_value='xxxxxxxxxxxxxxxxxxxxxxxx...xxxxxxxxxxxxxxxxxxxxxxx', input_type=str]\n"
144144
f' For further information visit https://errors.pydantic.dev/{__version__}/v/float_parsing\n'
145145
'y\n'

tests/validators/test_float.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
(1e10, 1e10),
2525
(True, 1),
2626
(False, 0),
27-
('wrong', Err('Input should be a valid number, unable to parse string as an number [type=float_parsing')),
27+
('wrong', Err('Input should be a valid number, unable to parse string as a number [type=float_parsing')),
2828
([1, 2], Err('Input should be a valid number [type=float_type, input_value=[1, 2], input_type=list]')),
2929
],
3030
)
@@ -161,7 +161,7 @@ def test_union_float_simple(py_and_json: PyAndJson):
161161
{
162162
'type': 'float_parsing',
163163
'loc': ('float',),
164-
'msg': 'Input should be a valid number, unable to parse string as an number',
164+
'msg': 'Input should be a valid number, unable to parse string as a number',
165165
'input': 'xxx',
166166
},
167167
{
@@ -251,15 +251,15 @@ def test_float_key(py_and_json: PyAndJson):
251251
'pika',
252252
True,
253253
Err(
254-
'Input should be a valid number, unable to parse string as an number '
254+
'Input should be a valid number, unable to parse string as a number '
255255
"[type=float_parsing, input_value='pika', input_type=str]"
256256
),
257257
),
258258
(
259259
'pika',
260260
False,
261261
Err(
262-
'Input should be a valid number, unable to parse string as an number '
262+
'Input should be a valid number, unable to parse string as a number '
263263
"[type=float_parsing, input_value='pika', input_type=str]"
264264
),
265265
),

0 commit comments

Comments
 (0)