pydantic
pydantic
BlogDocsChangelog

Add additional test for `FieldInfo.get_default()`

#12373Merged
Comparing
ido-friedman:testing/increase_test_fields_coverage
(
46de0bd
) with
main
(
e1dcaf9
)
CodSpeed Performance Gauge
-6%
Untouched
209
Ignored
2

Benchmarks

Passed

test_dataclass_to_json
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
+3%
40.9 µs39.7 µs
test_nested_model_validation[model_validate]
tests/benchmarks/test_model_validation.py
CodSpeed Performance Gauge
+3%
50.6 µs49.3 µs
test_core_string_strict_wrong
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
28.8 µs28.5 µs
test_complete_core_isinstance
pydantic-core/tests/benchmarks/test_complete_benchmark.py
CodSpeed Performance Gauge
+1%
1.8 ms1.8 ms
test_strict_union_error_core
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUnion
CodSpeed Performance Gauge
+1%
34.7 µs34.4 µs
test_complete_core_error
pydantic-core/tests/benchmarks/test_complete_benchmark.py
CodSpeed Performance Gauge
+1%
1.8 ms1.8 ms
test_strict_int_fails
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
28.7 µs28.4 µs
test_core_string_lax_wrong
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
29.2 µs28.9 µs
test_failed_rebuild
tests/benchmarks/test_model_schema_generation.py
CodSpeed Performance Gauge
+1%
239 µs237 µs
test_validate_literal[python-few_ints]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
15.8 µs15.7 µs
test_int_error
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
43.7 µs43.4 µs
test_core_dict
pydantic-core/tests/benchmarks/test_serialization_micro.py::TestBenchmarkSimpleModel
CodSpeed Performance Gauge
+1%
74.5 µs74 µs
test_chain_nested_functions
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
29.5 µs29.3 µs
test_int_range
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
16.1 µs16 µs
test_tagged_union_int_keys_python
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
+1%
21.8 µs21.7 µs
test_validate_literal[json-few_mixed]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
19.9 µs19.8 µs
test_complex_model_serialization
tests/benchmarks/test_model_serialization.py
CodSpeed Performance Gauge
0%
48 µs47.8 µs
test_complex_model_schema_generation
tests/benchmarks/test_model_schema_generation.py
CodSpeed Performance Gauge
0%
1.3 ms1.3 ms
test_enum_int_python
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
26.4 µs26.3 µs
test_validate_literal[json-few_str_enum]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
21.6 µs21.5 µs
test_north_star_json_dumps
tests/benchmarks/test_north_star.py
CodSpeed Performance Gauge
0%
24.6 ms24.5 ms
test_validate_literal[json-few_ints]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
17.2 µs17.1 µs
test_chain_function
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
25.3 µs25.2 µs
test_list_of_models_validation[__init__]
tests/benchmarks/test_model_validation.py
CodSpeed Performance Gauge
0%
77.7 µs77.4 µs
test_raise_error_value_error
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
38.1 µs38 µs
test_simple_model_schema_lots_of_fields_generation
tests/benchmarks/test_model_schema_generation.py
CodSpeed Performance Gauge
0%
17.6 ms17.5 ms
test_positional_tuple
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
19.8 µs19.7 µs
test_setattr
tests/benchmarks/test_attribute_access.py
CodSpeed Performance Gauge
0%
95.7 µs95.5 µs
test_list_of_any_core_py
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
101.9 µs101.7 µs
test_isinstance_json
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
20.7 µs20.6 µs
test_core_string_strict_wrong_str_e
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
40.5 µs40.4 µs
test_core_dict_filter
pydantic-core/tests/benchmarks/test_serialization_micro.py::TestBenchmarkSimpleModel
CodSpeed Performance Gauge
0%
80.9 µs80.7 µs
test_with_default
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
24.7 µs24.7 µs
test_raise_error_custom
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
39.7 µs39.6 µs
test_decimal_from_string_pyd
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDecimal
CodSpeed Performance Gauge
0%
34.2 µs34.1 µs
test_enum_str_python
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
25.3 µs25.3 µs
test_deeply_nested_recursive_model_schema_generation
tests/benchmarks/test_model_schema_generation_recursive.py
CodSpeed Performance Gauge
0%
1.3 ms1.2 ms
test_tagged_union_int_keys_json
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
25.2 µs25.1 µs
test_simple_model_serialization
tests/benchmarks/test_model_serialization.py
CodSpeed Performance Gauge
0%
36.5 µs36.4 µs
test_dict_of_ints_core_json
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
1.4 ms1.4 ms
test_model_validators_serializers
tests/benchmarks/test_model_schema_generation.py
CodSpeed Performance Gauge
0%
803.8 µs802.1 µs
test_filter
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
44 µs43.9 µs
test_validate_literal[json-many_large_strings]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
17.7 µs17.7 µs
test_uuid_from_string_pyd
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUUID
CodSpeed Performance Gauge
0%
49 µs49 µs
test_validate_literal[python-few_large_strings]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
16.5 µs16.4 µs
test_north_star_dump_python
tests/benchmarks/test_north_star.py
CodSpeed Performance Gauge
0%
17.6 ms17.5 ms
test_dont_raise_error_no_info
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
19.7 µs19.7 µs
test_list_of_models_serialization
tests/benchmarks/test_model_serialization.py
CodSpeed Performance Gauge
0%
57.3 µs57.2 µs
test_date_from_datetime_str
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
0%
20.2 µs20.2 µs
test_lots_of_models_with_lots_of_fields
tests/benchmarks/test_model_schema_generation.py
CodSpeed Performance Gauge
0%
1.9 s1.9 s
test_core_model_py
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
27.2 µs27.2 µs
test_list_of_strs_py_cached
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
134.3 µs134.2 µs
test_simple_model_schema_generation
tests/benchmarks/test_model_schema_generation.py
CodSpeed Performance Gauge
0%
618.5 µs618.1 µs
test_list_of_nullable_core
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
106.9 µs106.8 µs
test_core_root_model
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
37 µs36.9 µs
test_set_of_ints_core
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
734.7 µs734.4 µs
test_north_star_validate_python
tests/benchmarks/test_north_star.py
CodSpeed Performance Gauge
0%
36 ms36 ms
test_simple_recursive_model_schema_generation
tests/benchmarks/test_model_schema_generation_recursive.py
CodSpeed Performance Gauge
0%
618.2 µs618 µs
test_north_star_validate_python_strict
tests/benchmarks/test_north_star.py
CodSpeed Performance Gauge
0%
22 ms22 ms
test_definition_in_tree
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
783 µs782.7 µs
test_python_json_list_str
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
167.5 µs167.5 µs
test_north_star_validate_json
tests/benchmarks/test_north_star.py
CodSpeed Performance Gauge
0%
37.4 ms37.4 ms
test_definition_out_of_tree
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
1 ms1 ms
test_fastapi_startup_perf
tests/benchmarks/test_fastapi_startup_generics.py
CodSpeed Performance Gauge
0%
82.3 ms82.3 ms
test_north_star_json_loads
tests/benchmarks/test_north_star.py
CodSpeed Performance Gauge
0%
21.5 ms21.5 ms
test_fastapi_startup_perf
tests/benchmarks/test_fastapi_startup_simple.py
CodSpeed Performance Gauge
0%
19.1 ms19.1 ms
test_uuid_from_uuid_pyd
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUUID
CodSpeed Performance Gauge
0%
16.2 µs16.2 µs
test_validate_literal[json-few_large_strings]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
17.8 µs17.8 µs
test_validate_literal[python-many_ints]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
15.8 µs15.8 µs
test_datetime
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
28.8 µs28.8 µs
test_isinstance_basemodel
tests/benchmarks/test_isinstance.py
CodSpeed Performance Gauge
0%
5.1 ms5.1 ms
test_recursive_discriminated_union_with_base_model
tests/benchmarks/test_model_schema_generation_recursive.py
CodSpeed Performance Gauge
0%
1.4 ms1.4 ms
test_nested_model_schema_generation
tests/benchmarks/test_model_schema_generation.py
CodSpeed Performance Gauge
0%
767.1 µs767.1 µs
test_int_range_json
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
17.1 µs17.1 µs
test_python_json_list_none
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
133.9 µs133.9 µs
test_dataclass_serialization_json
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
26 µs26 µs
test_north_star_validate_json_strict
tests/benchmarks/test_north_star.py
CodSpeed Performance Gauge
0%
37.5 ms37.5 ms
test_complete_core_serializer_to_json
pydantic-core/tests/benchmarks/test_complete_benchmark.py
CodSpeed Performance Gauge
0%
283.4 µs283.5 µs
test_to_json_list_of_lists
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
1.8 ms1.8 ms
test_recursive_model_schema_generation
tests/benchmarks/test_model_schema_generation.py
CodSpeed Performance Gauge
0%
789.1 µs789.4 µs
test_core_json
pydantic-core/tests/benchmarks/test_serialization_micro.py::TestBenchmarkSimpleModel
CodSpeed Performance Gauge
0%
82.7 µs82.7 µs
test_field_function_validator
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
328.9 µs329.1 µs
test_set_of_ints_core_duplicates
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
329.3 µs329.4 µs
test_north_star_dump_json
tests/benchmarks/test_north_star.py
CodSpeed Performance Gauge
0%
30.4 ms30.4 ms
test_generic_recursive_model_schema_generation
tests/benchmarks/test_model_schema_generation_recursive.py
CodSpeed Performance Gauge
0%
685.6 µs686 µs
test_core_json_fs
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkSimpleModel
CodSpeed Performance Gauge
0%
109.3 µs109.3 µs
test_dict_of_any_core
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
655.7 µs656.1 µs
test_tagged_union_with_str_discriminator_schema_generation
tests/benchmarks/test_model_schema_generation.py
CodSpeed Performance Gauge
0%
992.6 µs993.3 µs
test_nested_recursive_generic_model_schema_generation
tests/benchmarks/test_model_schema_generation_recursive.py
CodSpeed Performance Gauge
0%
1.3 ms1.3 ms
test_nested_recursive_model_schema_generation
tests/benchmarks/test_model_schema_generation_recursive.py
CodSpeed Performance Gauge
0%
1.4 ms1.4 ms
test_json_direct_list_int
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
148.8 µs149 µs
test_dict_of_ints_core
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
1 ms1 ms
test_build_schema
pydantic-core/tests/benchmarks/test_complete_benchmark.py
CodSpeed Performance Gauge
0%
336.8 µs337.1 µs
test_model_instance
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
30.5 µs30.5 µs
test_model_core_json
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUUID
CodSpeed Performance Gauge
0%
41.9 µs41.9 µs
test_core_python_fs
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkSimpleModel
CodSpeed Performance Gauge
0%
71.5 µs71.5 µs
test_nested_schema_using_defs
pydantic-core/tests/benchmarks/test_nested_benchmark.py
CodSpeed Performance Gauge
0%
15.3 ms15.3 ms
test_json_any_list_int
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
203 µs203.2 µs
test_set_of_ints_core_length
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
754.1 µs755 µs
test_ser_list_of_lists
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
1.4 ms1.4 ms
test_datetime_milliseconds
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
26.1 µs26.1 µs
test_to_string_format
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
23.6 µs23.7 µs
test_generator_python
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
24.6 µs24.6 µs
test_function_wrap_json
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
32.9 µs33 µs
test_complete_core_serializer_to_python
pydantic-core/tests/benchmarks/test_complete_benchmark.py
CodSpeed Performance Gauge
0%
236.1 µs236.5 µs
test_model_json_serialization
tests/benchmarks/test_model_serialization.py
CodSpeed Performance Gauge
0%
55.3 µs55.4 µs
test_uuid
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
25.2 µs25.3 µs
test_getattr
tests/benchmarks/test_attribute_access.py
CodSpeed Performance Gauge
0%
62.9 µs63 µs
test_decimal_from_string_limit
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDecimal
CodSpeed Performance Gauge
0%
19.3 µs19.4 µs
test_model_list_core_json
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
168.8 µs169.1 µs
test_validate_literal[json-many_ints]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
17.1 µs17.1 µs
test_simple_model_validation[__init__]
tests/benchmarks/test_model_validation.py
CodSpeed Performance Gauge
0%
38 µs38.1 µs
test_python_json_list_int
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
161.1 µs161.4 µs
test_validate_literal[python-few_str_enum]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
16.6 µs16.7 µs
test_frozenset_of_ints_core
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
246.2 µs246.6 µs
test_uuid_from_string_core
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUUID
CodSpeed Performance Gauge
0%
32.6 µs32.7 µs
test_tagged_union_with_callable_discriminator_schema_generation
tests/benchmarks/test_model_schema_generation.py
CodSpeed Performance Gauge
0%
1 ms1 ms
test_core_string_lax
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
15.1 µs15.1 µs
test_core_string_strict
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
15.1 µs15.1 µs
test_strict_int
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
15.1 µs15.1 µs
test_nested_schema_inlined
pydantic-core/tests/benchmarks/test_nested_benchmark.py
CodSpeed Performance Gauge
0%
16.5 ms16.6 ms
test_schema_build
tests/benchmarks/test_discriminated_unions.py
CodSpeed Performance Gauge
0%
2.6 ms2.6 ms
test_chain_two_functions
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
29.9 µs29.9 µs
test_efficiency_with_highly_nested_examples
tests/benchmarks/test_discriminated_unions.py
CodSpeed Performance Gauge
0%
646.6 µs647.9 µs
test_small_class_core_model
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
28.7 µs28.8 µs
test_function_wrap_python
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
31.8 µs31.8 µs
test_core_python
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateTime
CodSpeed Performance Gauge
0%
28.4 µs28.5 µs
test_frozenset_of_ints_duplicates_core
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
150.1 µs150.4 µs
test_construct_dataclass_schema
tests/benchmarks/test_model_schema_generation.py
CodSpeed Performance Gauge
0%
1.1 ms1.1 ms
test_simple_model_validation[model_validate]
tests/benchmarks/test_model_validation.py
CodSpeed Performance Gauge
0%
39.6 µs39.7 µs
test_complete_core_strict
pydantic-core/tests/benchmarks/test_complete_benchmark.py
CodSpeed Performance Gauge
0%
255.1 µs255.7 µs
test_core_str
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUUID
CodSpeed Performance Gauge
0%
32.6 µs32.7 µs
test_decimal_from_string_core
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDecimal
CodSpeed Performance Gauge
0%
24.5 µs24.6 µs
test_bool_core
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
23.7 µs23.7 µs
test_many_models_core_model
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
2.5 ms2.5 ms
test_model_exclude_unset_true
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
36.9 µs37 µs
test_tuple_many_variable
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
19.3 µs19.4 µs
test_validate_literal[python-few_mixed]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
18.2 µs18.2 µs
test_strict_union_core
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUnion
CodSpeed Performance Gauge
0%
17.8 µs17.8 µs
test_import_basemodel
tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
0%
26.6 µs26.7 µs
test_core_future_str
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
0%
17.7 µs17.7 µs
test_date_from_str
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
0%
17.6 µs17.7 µs
test_import_field
tests/benchmarks/test_imports.py
CodSpeed Performance Gauge
0%
26.2 µs26.3 µs
test_nested_model_validation[__init__]
tests/benchmarks/test_model_validation.py
CodSpeed Performance Gauge
0%
52.2 µs52.4 µs
test_validate_literal[python-many_large_strings]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
16.4 µs16.5 µs
test_validate_literal[python-many_small_strings]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
16.3 µs16.4 µs
test_validate_literal[python-few_small_strings]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
16.3 µs16.3 µs
test_isinstance_string_strict_false
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
16.7 µs16.8 µs
test_model_exclude_unset_false
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
31.5 µs31.6 µs
test_definition_model_core
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
1.1 ms1.1 ms
test_arguments
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
25.5 µs25.5 µs
test_list_of_dict_models_core
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
95.7 µs96 µs
test_enum_int_core
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
16.1 µs16.1 µs
test_many_models_core_dict
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
1.1 ms1.1 ms
test_date_from_date
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
0%
15.4 µs15.5 µs
test_json_direct_list_str
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
184.4 µs185.1 µs
test_dont_raise_error
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
22.1 µs22.2 µs
test_list_of_ints_core_py
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
534.8 µs537 µs
test_json_any_list_str
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
242.3 µs243.2 µs
test_core_model_py_extra
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
30 µs30.2 µs
test_multi_host_url_core
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
33.5 µs33.6 µs
test_tuple_many_positional
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
19.3 µs19.4 µs
test_model_core_json
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateTime
CodSpeed Performance Gauge
0%
31.3 µs31.5 µs
test_datetime_seconds
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
25.9 µs26 µs
test_core_model_json
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
0%
26.1 µs26.2 µs
test_core_future
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
0%
18.2 µs18.3 µs
test_validate_literal[json-few_small_strings]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
17.5 µs17.6 µs
test_validate_literal[json-many_small_strings]
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
0%
17.5 µs17.6 µs
test_date_from_datetime
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateX
CodSpeed Performance Gauge
-1%
23.3 µs23.5 µs
test_dataclass_serialization_python
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
-1%
22.8 µs22.9 µs
test_complete_core_lax
pydantic-core/tests/benchmarks/test_complete_benchmark.py
CodSpeed Performance Gauge
-1%
271.8 µs273.2 µs
test_complete_core_root
pydantic-core/tests/benchmarks/test_complete_benchmark.py
CodSpeed Performance Gauge
-1%
280.4 µs282 µs
test_complete_core_root_json
pydantic-core/tests/benchmarks/test_complete_benchmark.py
CodSpeed Performance Gauge
-1%
429.3 µs431.7 µs
test_uuid_from_uuid_core
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUUID
CodSpeed Performance Gauge
-1%
15.3 µs15.4 µs
test_bytes_core
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
-1%
15 µs15.1 µs
test_small_class_core_dict
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
-1%
19.7 µs19.9 µs
test_core_str
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateTime
CodSpeed Performance Gauge
-1%
19.9 µs20 µs
test_url_core
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
-1%
25.5 µs25.7 µs
test_isinstance_string_lax_true
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
-1%
15.2 µs15.3 µs
test_isinstance_string_strict_true
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
-1%
15.2 µs15.3 µs
test_variable_tuple
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
-1%
19.4 µs19.5 µs
test_smart_union_coerce_core
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUnion
CodSpeed Performance Gauge
-1%
19.1 µs19.2 µs
test_generator_rust
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
-1%
19.2 µs19.3 µs
test_model_instance_abc
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
-1%
30.9 µs31.1 µs
test_core_future
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateTime
CodSpeed Performance Gauge
-1%
26.2 µs26.4 µs
test_isinstance_string_lax_false
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
-1%
17.1 µs17.2 µs
test_list_of_models_validation[model_validate]
tests/benchmarks/test_model_validation.py
CodSpeed Performance Gauge
-1%
73.8 µs74.3 µs
test_to_string_direct
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
-1%
20 µs20.1 µs
test_core_raw
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateTime
CodSpeed Performance Gauge
-1%
15.4 µs15.5 µs
test_core_raw
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUUID
CodSpeed Performance Gauge
-1%
15.3 µs15.4 µs
test_core_model_json_extra
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
-1%
29.9 µs30.1 µs
test_smart_union_core
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUnion
CodSpeed Performance Gauge
-1%
17.4 µs17.5 µs
test_enum_str_core
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
-1%
16.3 µs16.4 µs
test_chain_list
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
-1%
25.8 µs26 µs
test_complete_core_json
pydantic-core/tests/benchmarks/test_complete_benchmark.py
CodSpeed Performance Gauge
-1%
418.6 µs423 µs
test_core_json_fs
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestModelLarge
CodSpeed Performance Gauge
-1%
174.8 µs176.7 µs
test_core_future_str
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkDateTime
CodSpeed Performance Gauge
-1%
20 µs20.3 µs
test_date_format
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
-1%
51.6 µs52.4 µs
test_core_python
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestBenchmarkUUID
CodSpeed Performance Gauge
-2%
27.4 µs27.9 µs
test_date_format_function_no_info
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
-2%
51.5 µs52.4 µs
test_date_format_function
pydantic-core/tests/benchmarks/test_serialization_micro.py
CodSpeed Performance Gauge
-2%
52.6 µs53.8 µs
test_core_python
pydantic-core/tests/benchmarks/test_micro_benchmarks.py::TestModelLarge
CodSpeed Performance Gauge
-2%
128.1 µs131.1 µs
test_complex_model_validation[__init__]
tests/benchmarks/test_model_validation.py
CodSpeed Performance Gauge
-3%
51.2 µs52.6 µs
test_complex_model_validation[model_validate]
tests/benchmarks/test_model_validation.py
CodSpeed Performance Gauge
-3%
51 µs52.3 µs
test_set_of_ints_core_json
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
-4%
871.9 µs903.6 µs
test_list_of_ints_core_json
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
-4%
739.1 µs772.7 µs
test_list_of_strs_json_uncached
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
-5%
433.7 µs454.8 µs
test_list_of_strs_json_cached
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
-6%
306.3 µs327 µs
test_set_of_ints_core_json_duplicates
pydantic-core/tests/benchmarks/test_micro_benchmarks.py
CodSpeed Performance Gauge
-8%
404 µs439.7 µs

Ignored

test_field_validators_serializers
tests/benchmarks/test_model_schema_generation.py
Ignored
CodSpeed Performance Gauge
+2%
1.7 ms1.7 ms
test_nested_model_serialization
tests/benchmarks/test_model_serialization.py
Ignored
CodSpeed Performance Gauge
-1%
42.6 µs42.8 µs

Commits

Click on a commit to change the comparison range
Base
main
e1dcaf9
+0.27%
Add test for default factory without flag to use it
002daba
1 month ago
by ido-friedman
-0.22%
Add linting
21953ba
1 month ago
by ido-friedman
+0.14%
Update tests/test_fields.py
fbe0626
1 month ago
by Viicos
-6.52%
Merge branch 'main' into testing/increase_test_fields_coverage
46de0bd
3 days ago
by Viicos
© 2025 CodSpeed Technology
Home Terms Privacy Docs