>>> py3-pydantic-core: Building community/py3-pydantic-core 2.27.2-r0 (using abuild 3.16.0_rc4-r0) started Sat, 25 Oct 2025 21:43:08 +0000 >>> py3-pydantic-core: Validating /home/buildozer/aports/community/py3-pydantic-core/APKBUILD... >>> py3-pydantic-core: Analyzing dependencies... >>> py3-pydantic-core: Installing for build: build-base py3-typing-extensions py3-gpep517 py3-maturin py3-wheel py3-installer cargo py3-pytest py3-pytest-benchmark py3-pytest-mock py3-pytest-timeout py3-hypothesis py3-dirty-equals py3-tzdata ( 1/64) Installing libbz2 (1.0.8-r6) ( 2/64) Installing libffi (3.5.2-r0) ( 3/64) Installing gdbm (1.26-r0) ( 4/64) Installing xz-libs (5.8.1-r0) ( 5/64) Installing mpdecimal (4.0.1-r0) ( 6/64) Installing libpanelw (6.5_p20251010-r0) ( 7/64) Installing sqlite-libs (3.50.4-r1) ( 8/64) Installing python3 (3.12.12-r0) ( 9/64) Installing python3-pycache-pyc0 (3.12.12-r0) (10/64) Installing pyc (3.12.12-r0) (11/64) Installing py3-typing-extensions-pyc (4.15.0-r0) (12/64) Installing python3-pyc (3.12.12-r0) (13/64) Installing py3-typing-extensions (4.15.0-r0) (14/64) Installing py3-installer (0.7.0-r2) (15/64) Installing py3-installer-pyc (0.7.0-r2) (16/64) Installing py3-gpep517 (19-r0) (17/64) Installing py3-gpep517-pyc (19-r0) (18/64) Installing maturin (1.9.6-r0) (19/64) Installing py3-maturin (1.9.6-r0) (20/64) Installing py3-maturin-pyc (1.9.6-r0) (21/64) Installing py3-parsing (3.2.3-r0) (22/64) Installing py3-parsing-pyc (3.2.3-r0) (23/64) Installing py3-packaging (25.0-r0) (24/64) Installing py3-packaging-pyc (25.0-r0) (25/64) Installing py3-wheel (0.46.1-r0) (26/64) Installing py3-wheel-pyc (0.46.1-r0) (27/64) Installing libxml2 (2.13.9-r0) (28/64) Installing llvm21-libs (21.1.2-r1) (29/64) Installing scudo-malloc (21.1.2-r0) (30/64) Installing rust (1.90.0-r1) (31/64) Installing cargo (1.90.0-r1) (32/64) Installing py3-iniconfig (2.3.0-r0) (33/64) Installing py3-iniconfig-pyc (2.3.0-r0) (34/64) Installing py3-pluggy (1.6.0-r0) (35/64) Installing py3-pluggy-pyc (1.6.0-r0) (36/64) Installing py3-py (1.11.0-r4) (37/64) Installing py3-py-pyc (1.11.0-r4) (38/64) Installing py3-pygments (2.19.2-r0) (39/64) Installing py3-pygments-pyc (2.19.2-r0) (40/64) Installing py3-pytest (8.4.2-r1) (41/64) Installing py3-pytest-pyc (8.4.2-r1) (42/64) Installing py3-py-cpuinfo (9.0.0-r4) (43/64) Installing py3-py-cpuinfo-pyc (9.0.0-r4) (44/64) Installing py3-pytest-benchmark (4.0.0-r4) (45/64) Installing py3-pytest-benchmark-pyc (4.0.0-r4) (46/64) Installing py3-mock (5.2.0-r0) (47/64) Installing py3-mock-pyc (5.2.0-r0) (48/64) Installing py3-pytest-mock (3.10.0-r4) (49/64) Installing py3-pytest-mock-pyc (3.10.0-r4) (50/64) Installing py3-pytest-timeout (2.3.1-r1) (51/64) Installing py3-pytest-timeout-pyc (2.3.1-r1) (52/64) Installing py3-attrs (25.3.0-r0) (53/64) Installing py3-attrs-pyc (25.3.0-r0) (54/64) Installing py3-sortedcontainers (2.4.0-r5) (55/64) Installing py3-sortedcontainers-pyc (2.4.0-r5) (56/64) Installing py3-hypothesis (6.140.2-r0) (57/64) Installing py3-hypothesis-pyc (6.140.2-r0) (58/64) Installing py3-tz (2025.2-r0) (59/64) Installing py3-tz-pyc (2025.2-r0) (60/64) Installing py3-dirty-equals (0.8.0-r0) (61/64) Installing py3-dirty-equals-pyc (0.8.0-r0) (62/64) Installing py3-tzdata (2025.2-r0) (63/64) Installing py3-tzdata-pyc (2025.2-r0) (64/64) Installing .makedepends-py3-pydantic-core (20251025.214332) busybox-1.37.0-r24.trigger: Executing script... OK: 893 MiB in 169 packages >>> py3-pydantic-core: Cleaning up srcdir >>> py3-pydantic-core: Cleaning up pkgdir >>> py3-pydantic-core: Cleaning up tmpdir >>> py3-pydantic-core: Fetching https://distfiles.alpinelinux.org/distfiles/v3.23/py3-pydantic-core-2.27.2.tar.gz /var/cache/distfiles/v3.23/py3-pydantic-core-2.27.2.tar.gz: OK >>> py3-pydantic-core: Fetching https://distfiles.alpinelinux.org/distfiles/v3.23/py3-pydantic-core-2.27.2.tar.gz /var/cache/distfiles/v3.23/py3-pydantic-core-2.27.2.tar.gz: OK >>> py3-pydantic-core: Unpacking /var/cache/distfiles/v3.23/py3-pydantic-core-2.27.2.tar.gz... Updating crates.io index Downloading crates ... Downloaded tinyvec_macros v0.1.1 Downloaded percent-encoding v2.3.1 Downloaded version_check v0.9.5 Downloaded unicode-bidi v0.3.15 Downloaded uuid v1.11.0 Downloaded heck v0.5.0 Downloaded strum v0.26.3 Downloaded form_urlencoded v1.2.1 Downloaded equivalent v1.0.1 Downloaded cfg-if v1.0.0 Downloaded radium v0.7.0 Downloaded itoa v1.0.11 Downloaded smallvec v1.13.2 Downloaded rustversion v1.0.17 Downloaded write16 v1.0.0 Downloaded unindent v0.2.3 Downloaded utf8_iter v1.0.4 Downloaded target-lexicon v0.12.14 Downloaded tap v1.0.1 Downloaded pyo3-macros v0.22.6 Downloaded icu_provider_macros v1.5.0 Downloaded yoke-derive v0.7.4 Downloaded num-integer v0.1.46 Downloaded autocfg v1.3.0 Downloaded zerovec-derive v0.10.3 Downloaded funty v2.0.0 Downloaded synstructure v0.13.1 Downloaded unicode-ident v1.0.12 Downloaded writeable v0.5.5 Downloaded zerofrom-derive v0.1.4 Downloaded yoke v0.7.4 Downloaded hex v0.4.3 Downloaded stable_deref_trait v1.2.0 Downloaded displaydoc v0.2.5 Downloaded utf16_iter v1.0.5 Downloaded litemap v0.7.3 Downloaded once_cell v1.19.0 Downloaded getrandom v0.2.15 Downloaded wasi v0.11.0+wasi-snapshot-preview1 Downloaded static_assertions v1.1.0 Downloaded enum_dispatch v0.3.13 Downloaded icu_locid_transform v1.5.0 Downloaded icu_locid_transform_data v1.5.0 Downloaded icu_locid v1.5.0 Downloaded icu_provider v1.5.0 Downloaded icu_normalizer v1.5.0 Downloaded icu_normalizer_data v1.5.0 Downloaded icu_properties v1.5.1 Downloaded base64 v0.22.1 Downloaded python3-dll-a v0.2.10 Downloaded num-bigint v0.4.6 Downloaded indexmap v2.2.6 Downloaded zerovec v0.10.4 Downloaded zerocopy v0.7.34 Downloaded idna v1.0.2 Downloaded jiter v0.7.1 Downloaded lexical-parse-float v0.8.5 Downloaded bitvec v1.0.1 Downloaded icu_properties_data v1.5.0 Downloaded syn v2.0.82 Downloaded regex v1.11.1 Downloaded idna v0.5.0 Downloaded aho-corasick v1.1.3 Downloaded portable-atomic v1.6.0 Downloaded hashbrown v0.14.5 Downloaded serde_json v1.0.132 Downloaded regex-syntax v0.8.5 Downloaded memchr v2.7.4 Downloaded icu_collections v1.5.0 Downloaded lexical-util v0.8.5 Downloaded cc v1.0.101 Downloaded unicode-normalization v0.1.23 Downloaded serde v1.0.214 Downloaded ahash v0.8.11 Downloaded pyo3-ffi v0.22.6 Downloaded pyo3-macros-backend v0.22.6 Downloaded regex-automata v0.4.8 Downloaded pyo3 v0.22.6 Downloaded num-traits v0.2.19 Downloaded speedate v0.15.0 Downloaded url v2.5.2 Downloaded pyo3-build-config v0.22.6 Downloaded libc v0.2.155 Downloaded ryu v1.0.18 Downloaded serde_derive v1.0.214 Downloaded tinystr v0.7.6 Downloaded indoc v2.0.5 Downloaded proc-macro2 v1.0.86 Downloaded zerocopy-derive v0.7.34 Downloaded wyz v0.5.1 Downloaded lexical-parse-integer v0.8.6 Downloaded memoffset v0.9.1 Downloaded strum_macros v0.26.4 Downloaded tinyvec v1.6.1 Downloaded quote v1.0.36 Downloaded zerofrom v0.1.4 2025-10-25 21:43:37,810 gpep517 INFO Building wheel via backend maturin Running `maturin pep517 build-wheel -i /usr/bin/python3 --compatibility off --frozen` 📦 Including license file `LICENSE` 🍹 Building a mixed python/rust project 🔗 Found pyo3 bindings 🐍 Found CPython 3.12 at /usr/bin/python3 📡 Using build options features, bindings from pyproject.toml Compiling proc-macro2 v1.0.86 Compiling unicode-ident v1.0.12 Compiling target-lexicon v0.12.14 Compiling python3-dll-a v0.2.10 Compiling once_cell v1.19.0 Compiling stable_deref_trait v1.2.0 Compiling autocfg v1.3.0 Compiling heck v0.5.0 Compiling libc v0.2.155 Compiling version_check v0.9.5 Compiling writeable v0.5.5 Compiling litemap v0.7.3 Compiling rustversion v1.0.17 Compiling static_assertions v1.1.0 Compiling icu_locid_transform_data v1.5.0 Compiling tinyvec_macros v0.1.1 Compiling radium v0.7.0 Compiling memchr v2.7.4 Compiling cfg-if v1.0.0 Compiling icu_properties_data v1.5.0 Compiling smallvec v1.13.2 Compiling serde v1.0.214 Compiling tap v1.0.1 Compiling funty v2.0.0 Compiling equivalent v1.0.1 Compiling icu_normalizer_data v1.5.0 Compiling unicode-bidi v0.3.15 Compiling utf16_iter v1.0.5 Compiling unindent v0.2.3 Compiling indoc v2.0.5 Compiling zerocopy v0.7.34 Compiling regex-syntax v0.8.5 Compiling utf8_iter v1.0.4 Compiling serde_json v1.0.132 Compiling percent-encoding v2.3.1 Compiling write16 v1.0.0 Compiling hashbrown v0.14.5 Compiling itoa v1.0.11 Compiling ryu v1.0.18 Compiling hex v0.4.3 Compiling base64 v0.22.1 Compiling uuid v1.11.0 Compiling tinyvec v1.6.1 Compiling lexical-util v0.8.5 Compiling wyz v0.5.1 Compiling form_urlencoded v1.2.1 Compiling ahash v0.8.11 Compiling num-traits v0.2.19 Compiling memoffset v0.9.1 Compiling aho-corasick v1.1.3 Compiling bitvec v1.0.1 Compiling indexmap v2.2.6 Compiling pyo3-build-config v0.22.6 Compiling quote v1.0.36 Compiling syn v2.0.82 Compiling unicode-normalization v0.1.23 Compiling getrandom v0.2.15 Compiling lexical-parse-integer v0.8.6 Compiling lexical-parse-float v0.8.5 Compiling num-integer v0.1.46 Compiling idna v0.5.0 Compiling num-bigint v0.4.6 Compiling pyo3-ffi v0.22.6 Compiling pyo3-macros-backend v0.22.6 Compiling pyo3 v0.22.6 Compiling jiter v0.7.1 Compiling pydantic-core v2.27.2 (/home/buildozer/aports/community/py3-pydantic-core/src/pydantic-core-2.27.2) Compiling url v2.5.2 Compiling regex-automata v0.4.8 Compiling regex v1.11.1 Compiling synstructure v0.13.1 Compiling zerofrom-derive v0.1.4 Compiling yoke-derive v0.7.4 Compiling zerovec-derive v0.10.3 Compiling displaydoc v0.2.5 Compiling icu_provider_macros v1.5.0 Compiling serde_derive v1.0.214 Compiling strum_macros v0.26.4 Compiling enum_dispatch v0.3.13 Compiling zerofrom v0.1.4 Compiling yoke v0.7.4 Compiling zerovec v0.10.4 Compiling strum v0.26.3 Compiling speedate v0.15.0 Compiling tinystr v0.7.6 Compiling icu_collections v1.5.0 Compiling pyo3-macros v0.22.6 Compiling icu_locid v1.5.0 Compiling icu_provider v1.5.0 Compiling icu_locid_transform v1.5.0 Compiling icu_properties v1.5.1 Compiling icu_normalizer v1.5.0 Compiling idna v1.0.2 warning: hiding a lifetime that's elided elsewhere is confusing --> src/errors/types.rs:21:28 | 21 | pub fn list_all_errors(py: Python) -> PyResult> { | ^^^^^^ -- the same lifetime is elided here | | | the lifetime is hidden here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default help: consistently use `'_` | 21 | pub fn list_all_errors(py: Python<'_>) -> PyResult> { | ++++ warning: hiding a lifetime that's elided elsewhere is confusing --> src/errors/validation_exception.rs:234:23 | 234 | fn get_url_prefix(py: Python, include_url: bool) -> Option<&str> { | ^^^^^^ the lifetime is hidden here ---- the same lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 234 | fn get_url_prefix(py: Python<'_>, include_url: bool) -> Option<&str> { | ++++ warning: hiding a lifetime that's elided elsewhere is confusing --> src/input/return_enums.rs:468:19 | 468 | pub fn as_cow(&self) -> ValResult> { | ^^^^^ -------- the same lifetime is hidden here | | | the lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 468 | pub fn as_cow(&self) -> ValResult> { | +++ warning: hiding a lifetime that's elided elsewhere is confusing --> src/input/shared.rs:14:33 | 14 | pub fn get_enum_meta_object(py: Python) -> &Bound<'_, PyAny> { | ^^^^^^ ----------------- | | | | | | | the same lifetime is elided here | | the same lifetime is elided here | the lifetime is hidden here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 14 | pub fn get_enum_meta_object(py: Python<'_>) -> &Bound<'_, PyAny> { | ++++ warning: hiding a lifetime that's elided elsewhere is confusing --> src/input/shared.rs:111:25 | 111 | fn clean_int_str(mut s: &str) -> Option> { | ^^^^ -------- the same lifetime is hidden here | | | the lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 111 | fn clean_int_str(mut s: &str) -> Option> { | +++ warning: hiding a lifetime that's elided elsewhere is confusing --> src/lookup_key.rs:379:17 | 379 | pub fn iter(&self) -> Iter { | ^^^^^ -------------- the same lifetime is hidden here | | | the lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 379 | pub fn iter(&self) -> Iter<'_, PathItem> { | +++ warning: hiding a lifetime that's elided elsewhere is confusing --> src/validators/mod.rs:99:27 | 99 | fn __match_args__(py: Python) -> Bound<'_, PyTuple> { | ^^^^^^ -- the same lifetime is elided here | | | the lifetime is hidden here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: consistently use `'_` | 99 | fn __match_args__(py: Python<'_>) -> Bound<'_, PyTuple> { | ++++ warning: hiding a lifetime that's elided elsewhere is confusing --> src/validators/complex.rs:14:29 | 14 | pub fn get_complex_type(py: Python) -> &Bound<'_, PyType> { | ^^^^^^ ------------------ | | | | | | | the same lifetime is elided here | | the same lifetime is elided here | the lifetime is hidden here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 14 | pub fn get_complex_type(py: Python<'_>) -> &Bound<'_, PyType> { | ++++ warning: hiding a lifetime that's elided elsewhere is confusing --> src/validators/decimal.rs:19:29 | 19 | pub fn get_decimal_type(py: Python) -> &Bound<'_, PyType> { | ^^^^^^ ------------------ | | | | | | | the same lifetime is elided here | | the same lifetime is elided here | the lifetime is hidden here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 19 | pub fn get_decimal_type(py: Python<'_>) -> &Bound<'_, PyType> { | ++++ warning: hiding a lifetime that's elided elsewhere is confusing --> src/validators/uuid.rs:33:22 | 33 | fn get_uuid_type(py: Python) -> PyResult<&Bound<'_, PyType>> { | ^^^^^^ ------------------ | | | | | | | the same lifetime is elided here | | the same lifetime is elided here | the lifetime is hidden here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing help: use `'_` for type paths | 33 | fn get_uuid_type(py: Python<'_>) -> PyResult<&Bound<'_, PyType>> { | ++++ warning: `pydantic-core` (lib) generated 10 warnings Finished `release` profile [optimized] target(s) in 1m 55s 📦 Built wheel for CPython 3.12 to /home/buildozer/aports/community/py3-pydantic-core/src/pydantic-core-2.27.2/target/wheels/pydantic_core-2.27.2-cp312-cp312-linux_i686.whl /home/buildozer/aports/community/py3-pydantic-core/src/pydantic-core-2.27.2/target/wheels/pydantic_core-2.27.2-cp312-cp312-linux_i686.whl 2025-10-25 21:45:34,387 gpep517 INFO The backend produced .dist/pydantic_core-2.27.2-cp312-cp312-linux_i686.whl pydantic_core-2.27.2-cp312-cp312-linux_i686.whl ============================= test session starts ============================== platform linux -- Python 3.12.12, pytest-8.4.2, pluggy-1.6.0 benchmark: 4.0.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=True warmup_iterations=100000) rootdir: /home/buildozer/aports/community/py3-pydantic-core/src/pydantic-core-2.27.2 configfile: pyproject.toml testpaths: tests plugins: mock-3.10.0, hypothesis-6.140.2, benchmark-4.0.0, timeout-2.3.1 timeout: 30.0s timeout method: signal timeout func_only: False collected 4607 items tests/benchmarks/test_complete_benchmark.py .......... [ 0%] tests/benchmarks/test_micro_benchmarks.py .............................. [ 0%] ........................................................................ [ 2%] ............. [ 2%] tests/benchmarks/test_nested_benchmark.py .. [ 2%] tests/benchmarks/test_serialization_micro.py ........................... [ 3%] ... [ 3%] tests/serializers/test_any.py ...............................s.......... [ 4%] .........................................s..... [ 5%] tests/serializers/test_bytes.py ................ [ 5%] tests/serializers/test_complex.py .......... [ 5%] tests/serializers/test_dataclasses.py .....x [ 6%] tests/serializers/test_datetime.py .................. [ 6%] tests/serializers/test_decimal.py ....... [ 6%] tests/serializers/test_definitions.py ........ [ 6%] tests/serializers/test_definitions_recursive.py ..... [ 6%] tests/serializers/test_dict.py ............................... [ 7%] tests/serializers/test_enum.py ..... [ 7%] tests/serializers/test_format.py ............... [ 7%] tests/serializers/test_functions.py ................................ [ 8%] tests/serializers/test_generator.py ...... [ 8%] tests/serializers/test_infer.py ... [ 8%] tests/serializers/test_json.py .... [ 8%] tests/serializers/test_json_or_python.py .. [ 8%] tests/serializers/test_list_tuple.py ................................... [ 9%] ..................................... [ 10%] tests/serializers/test_literal.py ...... [ 10%] tests/serializers/test_misc.py .. [ 10%] tests/serializers/test_model.py ........................................ [ 11%] ................ [ 11%] tests/serializers/test_model_root.py ........ [ 12%] tests/serializers/test_none.py ............................ [ 12%] tests/serializers/test_nullable.py . [ 12%] tests/serializers/test_other.py ....... [ 12%] tests/serializers/test_pickling.py ..... [ 13%] tests/serializers/test_serialize_as_any.py .... [ 13%] tests/serializers/test_set_frozenset.py ....... [ 13%] tests/serializers/test_simple.py ..........................s............ [ 14%] [ 14%] tests/serializers/test_string.py ........... [ 14%] tests/serializers/test_timedelta.py ...s [ 14%] tests/serializers/test_typed_dict.py ........................... [ 14%] tests/serializers/test_union.py ........................................ [ 15%] .................................................................. [ 17%] tests/serializers/test_url.py .......... [ 17%] tests/serializers/test_uuid.py ....... [ 17%] tests/test_build.py ..........s...... [ 18%] tests/test_config.py .............. [ 18%] tests/test_custom_errors.py .... [ 18%] tests/test_docstrings.py ss [ 18%] tests/test_errors.py ................................................... [ 19%] ........................................................................ [ 21%] ....................................s............................... [ 22%] tests/test_garbage_collection.py ... [ 22%] tests/test_hypothesis.py ........... [ 22%] tests/test_isinstance.py ..... [ 23%] tests/test_json.py .................................................. [ 24%] tests/test_misc.py ................ [ 24%] tests/test_schema_functions.py ......................................... [ 25%] .................................... [ 26%] tests/test_strict.py .................................... [ 26%] tests/test_typing.py .......... [ 27%] tests/test_tzinfo.py ............ [ 27%] tests/test_validate_strings.py .................... [ 27%] tests/test_validation_context.py ........... [ 28%] tests/validators/test_arguments.py ......FFFFF...s..FFFFFs.......FFs.sss [ 28%] ssFF........ssssss.................sss......s..s.............s...sss.... [ 30%] .s...s......ssss......sss....ssss...sss.....sssss........ [ 31%] tests/validators/test_bool.py ....................................... [ 32%] tests/validators/test_bytes.py ............................ [ 33%] tests/validators/test_call.py .......................... [ 33%] tests/validators/test_callable.py .............. [ 33%] tests/validators/test_chain.py ............ [ 34%] tests/validators/test_complex.py ....................................... [ 35%] .... [ 35%] tests/validators/test_custom_error.py ...... [ 35%] tests/validators/test_dataclasses.py .......s..sss........sssss......s.. [ 36%] ........................................................................ [ 37%] ................................. [ 38%] tests/validators/test_date.py .......................................... [ 39%] .............................................................. [ 40%] tests/validators/test_datetime.py ...................................... [ 41%] .................................................................. [ 42%] tests/validators/test_decimal.py ....................................... [ 43%] ........................................................................ [ 45%] ........................................................................ [ 46%] ........ [ 47%] tests/validators/test_definitions.py ............ [ 47%] tests/validators/test_definitions_recursive.py ......................... [ 47%] ........... [ 48%] tests/validators/test_dict.py ................................ [ 48%] tests/validators/test_enums.py ...................... [ 49%] tests/validators/test_float.py ......................................... [ 50%] ........................................................................ [ 51%] ........................................................... [ 52%] tests/validators/test_frozenset.py ..................................... [ 53%] .................................... [ 54%] tests/validators/test_function.py ...................................... [ 55%] ................... [ 55%] tests/validators/test_generator.py ..................................... [ 56%] . [ 56%] tests/validators/test_int.py ........................................... [ 57%] ........................................................................ [ 59%] ........................................................................ [ 60%] ............................................ [ 61%] tests/validators/test_is_instance.py ................................. [ 62%] tests/validators/test_is_subclass.py .............. [ 62%] tests/validators/test_json.py ................................. [ 63%] tests/validators/test_json_or_python.py . [ 63%] tests/validators/test_lax_or_strict.py .. [ 63%] tests/validators/test_list.py .......................................... [ 64%] ...................................................... [ 65%] tests/validators/test_literal.py ....................................... [ 66%] ....... [ 66%] tests/validators/test_model.py ......................................... [ 67%] . [ 67%] tests/validators/test_model_fields.py .................................. [ 68%] ........................................................................ [ 69%] ........................................................................ [ 71%] ............................ [ 71%] tests/validators/test_model_init.py .............. [ 72%] tests/validators/test_model_root.py ......... [ 72%] tests/validators/test_none.py .. [ 72%] tests/validators/test_nullable.py ... [ 72%] tests/validators/test_pickling.py ... [ 72%] tests/validators/test_set.py ........................................... [ 73%] ................................ [ 74%] tests/validators/test_string.py ........................................ [ 75%] ...................................................................... [ 76%] tests/validators/test_tagged_union.py .................................. [ 77%] .............. [ 77%] tests/validators/test_time.py .......................................... [ 78%] ......................................... [ 79%] tests/validators/test_timedelta.py ..................................... [ 80%] ..........................................s [ 81%] tests/validators/test_tuple.py ......................................... [ 82%] ................................................ [ 83%] tests/validators/test_typed_dict.py .................................... [ 83%] ........................................................................ [ 85%] .............................................. [ 86%] tests/validators/test_union.py ......................................... [ 87%] ...........x............................. [ 88%] tests/validators/test_url.py ........................................... [ 89%] ........................................................................ [ 90%] ........................................................................ [ 92%] ........................................................................ [ 93%] ........................................................................ [ 95%] ....... [ 95%] tests/validators/test_uuid.py .......................................... [ 96%] ........................................ [ 97%] tests/validators/test_with_default.py .................................. [ 98%] ........................................................................ [ 99%] ................. [100%] =================================== FAILURES =================================== _ test_positional_args[python-ArgsKwargs((1, 'a', True), {'x': 1})-Err('', errors=[{'type': 'unexpected_keyword_argument', 'loc': ('x',), 'msg': 'Unexpected keyword argument', 'input': 1}])] _ py_and_json = .ChosenPyAndJsonValidator'> input_value = ArgsKwargs((1, 'a', True), {'x': 1}) expected = Err('', errors=[{'type': 'unexpected_keyword_argument', 'loc': ('x',), 'msg': 'Unexpected keyword argument', 'input': 1}]) @pytest.mark.parametrize( 'input_value,expected', [ [(1, 'a', True), ((1, 'a', True), {})], [[1, 'a', True], ((1, 'a', True), {})], [ArgsKwargs((1, 'a', True)), ((1, 'a', True), {})], [(1, 'a', 'true'), ((1, 'a', True), {})], ['x', Err('type=arguments_type,')], [ ArgsKwargs((1, 'a', True), {'x': 1}), Err( '', [ { 'type': 'unexpected_keyword_argument', 'loc': ('x',), 'msg': 'Unexpected keyword argument', 'input': 1, } ], ), ], [ [1], Err( '', [ { 'type': 'missing_positional_only_argument', 'loc': (1,), 'msg': 'Missing required positional only argument', 'input': [1], }, { 'type': 'missing_positional_only_argument', 'loc': (2,), 'msg': 'Missing required positional only argument', 'input': [1], }, ], ), ], [ [1, 'a', True, 4], Err( '', [ { 'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4, } ], ), ], [ [1, 'a', True, 4, 5], Err( '', [ { 'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4, }, { 'type': 'unexpected_positional_argument', 'loc': (4,), 'msg': 'Unexpected positional argument', 'input': 5, }, ], ), ], [ ('x', 'a', 'wrong'), Err( '', [ { 'type': 'int_parsing', 'loc': (0,), 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': 'x', }, { 'type': 'bool_parsing', 'loc': (2,), 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': 'wrong', }, ], ), ], [ ArgsKwargs(()), Err( '3 validation errors for arguments', [ { 'type': 'missing_positional_only_argument', 'loc': (0,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_positional_only_argument', 'loc': (1,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_positional_only_argument', 'loc': (2,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, ], ), ], ], ids=repr, ) def test_positional_args(py_and_json: PyAndJson, input_value, expected): v = py_and_json( { 'type': 'arguments', 'arguments_schema': [ {'name': 'a', 'mode': 'positional_only', 'schema': {'type': 'int'}}, {'name': 'b', 'mode': 'positional_only', 'schema': {'type': 'str'}}, {'name': 'c', 'mode': 'positional_only', 'schema': {'type': 'bool'}}, ], } ) if isinstance(expected, Err): > with pytest.raises(ValidationError, match=re.escape(expected.message)) as exc_info: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/validators/test_arguments.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/_pytest/raises.py:624: in __init__ super().__init__(match=match, check=check) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <[AttributeError("'RaisesExc' object has no attribute 'expected_exceptions'") raised in repr()] RaisesExc object at 0xf452fd80> def __init__( self, *, match: str | Pattern[str] | None, check: Callable[[BaseExcT_co], bool] | None, ) -> None: if isinstance(match, str): # juggle error in order to avoid context to fail (necessary?) re_error = None try: self.match: Pattern[str] | None = re.compile(match) except re.error as e: re_error = e if re_error is not None: fail(f"Invalid regex pattern provided to 'match': {re_error}") if match == "": > warnings.warn( PytestWarning( "matching against an empty string will *always* pass. If you want " "to check for an empty message you need to pass '^$'. If you don't " "want to match you should pass `None` or leave out the parameter." ), stacklevel=2, ) E pytest.PytestWarning: matching against an empty string will *always* pass. If you want to check for an empty message you need to pass '^$'. If you don't want to match you should pass `None` or leave out the parameter. /usr/lib/python3.12/site-packages/_pytest/raises.py:401: PytestWarning _ test_positional_args[python-[1]-Err('', errors=[{'type': 'missing_positional_only_argument', 'loc': (1,), 'msg': 'Missing required positional only argument', 'input': [1]}, {'type': 'missing_positional_only_argument', 'loc': (2,), 'msg': 'Missing required positional only argument', 'input': [1]}])] _ py_and_json = .ChosenPyAndJsonValidator'> input_value = [1] expected = Err('', errors=[{'type': 'missing_positional_only_argument', 'loc': (1,), 'msg': 'Missing required positional only arg...': 'missing_positional_only_argument', 'loc': (2,), 'msg': 'Missing required positional only argument', 'input': [1]}]) @pytest.mark.parametrize( 'input_value,expected', [ [(1, 'a', True), ((1, 'a', True), {})], [[1, 'a', True], ((1, 'a', True), {})], [ArgsKwargs((1, 'a', True)), ((1, 'a', True), {})], [(1, 'a', 'true'), ((1, 'a', True), {})], ['x', Err('type=arguments_type,')], [ ArgsKwargs((1, 'a', True), {'x': 1}), Err( '', [ { 'type': 'unexpected_keyword_argument', 'loc': ('x',), 'msg': 'Unexpected keyword argument', 'input': 1, } ], ), ], [ [1], Err( '', [ { 'type': 'missing_positional_only_argument', 'loc': (1,), 'msg': 'Missing required positional only argument', 'input': [1], }, { 'type': 'missing_positional_only_argument', 'loc': (2,), 'msg': 'Missing required positional only argument', 'input': [1], }, ], ), ], [ [1, 'a', True, 4], Err( '', [ { 'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4, } ], ), ], [ [1, 'a', True, 4, 5], Err( '', [ { 'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4, }, { 'type': 'unexpected_positional_argument', 'loc': (4,), 'msg': 'Unexpected positional argument', 'input': 5, }, ], ), ], [ ('x', 'a', 'wrong'), Err( '', [ { 'type': 'int_parsing', 'loc': (0,), 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': 'x', }, { 'type': 'bool_parsing', 'loc': (2,), 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': 'wrong', }, ], ), ], [ ArgsKwargs(()), Err( '3 validation errors for arguments', [ { 'type': 'missing_positional_only_argument', 'loc': (0,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_positional_only_argument', 'loc': (1,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_positional_only_argument', 'loc': (2,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, ], ), ], ], ids=repr, ) def test_positional_args(py_and_json: PyAndJson, input_value, expected): v = py_and_json( { 'type': 'arguments', 'arguments_schema': [ {'name': 'a', 'mode': 'positional_only', 'schema': {'type': 'int'}}, {'name': 'b', 'mode': 'positional_only', 'schema': {'type': 'str'}}, {'name': 'c', 'mode': 'positional_only', 'schema': {'type': 'bool'}}, ], } ) if isinstance(expected, Err): > with pytest.raises(ValidationError, match=re.escape(expected.message)) as exc_info: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/validators/test_arguments.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/_pytest/raises.py:624: in __init__ super().__init__(match=match, check=check) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <[AttributeError("'RaisesExc' object has no attribute 'expected_exceptions'") raised in repr()] RaisesExc object at 0xf4933720> def __init__( self, *, match: str | Pattern[str] | None, check: Callable[[BaseExcT_co], bool] | None, ) -> None: if isinstance(match, str): # juggle error in order to avoid context to fail (necessary?) re_error = None try: self.match: Pattern[str] | None = re.compile(match) except re.error as e: re_error = e if re_error is not None: fail(f"Invalid regex pattern provided to 'match': {re_error}") if match == "": > warnings.warn( PytestWarning( "matching against an empty string will *always* pass. If you want " "to check for an empty message you need to pass '^$'. If you don't " "want to match you should pass `None` or leave out the parameter." ), stacklevel=2, ) E pytest.PytestWarning: matching against an empty string will *always* pass. If you want to check for an empty message you need to pass '^$'. If you don't want to match you should pass `None` or leave out the parameter. /usr/lib/python3.12/site-packages/_pytest/raises.py:401: PytestWarning _ test_positional_args[python-[1, 'a', True, 4]-Err('', errors=[{'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4}])] _ py_and_json = .ChosenPyAndJsonValidator'> input_value = [1, 'a', True, 4] expected = Err('', errors=[{'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4}]) @pytest.mark.parametrize( 'input_value,expected', [ [(1, 'a', True), ((1, 'a', True), {})], [[1, 'a', True], ((1, 'a', True), {})], [ArgsKwargs((1, 'a', True)), ((1, 'a', True), {})], [(1, 'a', 'true'), ((1, 'a', True), {})], ['x', Err('type=arguments_type,')], [ ArgsKwargs((1, 'a', True), {'x': 1}), Err( '', [ { 'type': 'unexpected_keyword_argument', 'loc': ('x',), 'msg': 'Unexpected keyword argument', 'input': 1, } ], ), ], [ [1], Err( '', [ { 'type': 'missing_positional_only_argument', 'loc': (1,), 'msg': 'Missing required positional only argument', 'input': [1], }, { 'type': 'missing_positional_only_argument', 'loc': (2,), 'msg': 'Missing required positional only argument', 'input': [1], }, ], ), ], [ [1, 'a', True, 4], Err( '', [ { 'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4, } ], ), ], [ [1, 'a', True, 4, 5], Err( '', [ { 'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4, }, { 'type': 'unexpected_positional_argument', 'loc': (4,), 'msg': 'Unexpected positional argument', 'input': 5, }, ], ), ], [ ('x', 'a', 'wrong'), Err( '', [ { 'type': 'int_parsing', 'loc': (0,), 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': 'x', }, { 'type': 'bool_parsing', 'loc': (2,), 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': 'wrong', }, ], ), ], [ ArgsKwargs(()), Err( '3 validation errors for arguments', [ { 'type': 'missing_positional_only_argument', 'loc': (0,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_positional_only_argument', 'loc': (1,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_positional_only_argument', 'loc': (2,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, ], ), ], ], ids=repr, ) def test_positional_args(py_and_json: PyAndJson, input_value, expected): v = py_and_json( { 'type': 'arguments', 'arguments_schema': [ {'name': 'a', 'mode': 'positional_only', 'schema': {'type': 'int'}}, {'name': 'b', 'mode': 'positional_only', 'schema': {'type': 'str'}}, {'name': 'c', 'mode': 'positional_only', 'schema': {'type': 'bool'}}, ], } ) if isinstance(expected, Err): > with pytest.raises(ValidationError, match=re.escape(expected.message)) as exc_info: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/validators/test_arguments.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/_pytest/raises.py:624: in __init__ super().__init__(match=match, check=check) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <[AttributeError("'RaisesExc' object has no attribute 'expected_exceptions'") raised in repr()] RaisesExc object at 0xf4542d68> def __init__( self, *, match: str | Pattern[str] | None, check: Callable[[BaseExcT_co], bool] | None, ) -> None: if isinstance(match, str): # juggle error in order to avoid context to fail (necessary?) re_error = None try: self.match: Pattern[str] | None = re.compile(match) except re.error as e: re_error = e if re_error is not None: fail(f"Invalid regex pattern provided to 'match': {re_error}") if match == "": > warnings.warn( PytestWarning( "matching against an empty string will *always* pass. If you want " "to check for an empty message you need to pass '^$'. If you don't " "want to match you should pass `None` or leave out the parameter." ), stacklevel=2, ) E pytest.PytestWarning: matching against an empty string will *always* pass. If you want to check for an empty message you need to pass '^$'. If you don't want to match you should pass `None` or leave out the parameter. /usr/lib/python3.12/site-packages/_pytest/raises.py:401: PytestWarning _ test_positional_args[python-[1, 'a', True, 4, 5]-Err('', errors=[{'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4}, {'type': 'unexpected_positional_argument', 'loc': (4,), 'msg': 'Unexpected positional argument', 'input': 5}])] _ py_and_json = .ChosenPyAndJsonValidator'> input_value = [1, 'a', True, 4, 5] expected = Err('', errors=[{'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4}, {'type': 'unexpected_positional_argument', 'loc': (4,), 'msg': 'Unexpected positional argument', 'input': 5}]) @pytest.mark.parametrize( 'input_value,expected', [ [(1, 'a', True), ((1, 'a', True), {})], [[1, 'a', True], ((1, 'a', True), {})], [ArgsKwargs((1, 'a', True)), ((1, 'a', True), {})], [(1, 'a', 'true'), ((1, 'a', True), {})], ['x', Err('type=arguments_type,')], [ ArgsKwargs((1, 'a', True), {'x': 1}), Err( '', [ { 'type': 'unexpected_keyword_argument', 'loc': ('x',), 'msg': 'Unexpected keyword argument', 'input': 1, } ], ), ], [ [1], Err( '', [ { 'type': 'missing_positional_only_argument', 'loc': (1,), 'msg': 'Missing required positional only argument', 'input': [1], }, { 'type': 'missing_positional_only_argument', 'loc': (2,), 'msg': 'Missing required positional only argument', 'input': [1], }, ], ), ], [ [1, 'a', True, 4], Err( '', [ { 'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4, } ], ), ], [ [1, 'a', True, 4, 5], Err( '', [ { 'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4, }, { 'type': 'unexpected_positional_argument', 'loc': (4,), 'msg': 'Unexpected positional argument', 'input': 5, }, ], ), ], [ ('x', 'a', 'wrong'), Err( '', [ { 'type': 'int_parsing', 'loc': (0,), 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': 'x', }, { 'type': 'bool_parsing', 'loc': (2,), 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': 'wrong', }, ], ), ], [ ArgsKwargs(()), Err( '3 validation errors for arguments', [ { 'type': 'missing_positional_only_argument', 'loc': (0,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_positional_only_argument', 'loc': (1,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_positional_only_argument', 'loc': (2,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, ], ), ], ], ids=repr, ) def test_positional_args(py_and_json: PyAndJson, input_value, expected): v = py_and_json( { 'type': 'arguments', 'arguments_schema': [ {'name': 'a', 'mode': 'positional_only', 'schema': {'type': 'int'}}, {'name': 'b', 'mode': 'positional_only', 'schema': {'type': 'str'}}, {'name': 'c', 'mode': 'positional_only', 'schema': {'type': 'bool'}}, ], } ) if isinstance(expected, Err): > with pytest.raises(ValidationError, match=re.escape(expected.message)) as exc_info: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/validators/test_arguments.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/_pytest/raises.py:624: in __init__ super().__init__(match=match, check=check) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <[AttributeError("'RaisesExc' object has no attribute 'expected_exceptions'") raised in repr()] RaisesExc object at 0xf4542738> def __init__( self, *, match: str | Pattern[str] | None, check: Callable[[BaseExcT_co], bool] | None, ) -> None: if isinstance(match, str): # juggle error in order to avoid context to fail (necessary?) re_error = None try: self.match: Pattern[str] | None = re.compile(match) except re.error as e: re_error = e if re_error is not None: fail(f"Invalid regex pattern provided to 'match': {re_error}") if match == "": > warnings.warn( PytestWarning( "matching against an empty string will *always* pass. If you want " "to check for an empty message you need to pass '^$'. If you don't " "want to match you should pass `None` or leave out the parameter." ), stacklevel=2, ) E pytest.PytestWarning: matching against an empty string will *always* pass. If you want to check for an empty message you need to pass '^$'. If you don't want to match you should pass `None` or leave out the parameter. /usr/lib/python3.12/site-packages/_pytest/raises.py:401: PytestWarning _ test_positional_args[python-('x', 'a', 'wrong')-Err('', errors=[{'type': 'int_parsing', 'loc': (0,), 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': 'x'}, {'type': 'bool_parsing', 'loc': (2,), 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': 'wrong'}])] _ py_and_json = .ChosenPyAndJsonValidator'> input_value = ('x', 'a', 'wrong') expected = Err('', errors=[{'type': 'int_parsing', 'loc': (0,), 'msg': 'Input should be a valid integer, unable to parse string a...: 'bool_parsing', 'loc': (2,), 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': 'wrong'}]) @pytest.mark.parametrize( 'input_value,expected', [ [(1, 'a', True), ((1, 'a', True), {})], [[1, 'a', True], ((1, 'a', True), {})], [ArgsKwargs((1, 'a', True)), ((1, 'a', True), {})], [(1, 'a', 'true'), ((1, 'a', True), {})], ['x', Err('type=arguments_type,')], [ ArgsKwargs((1, 'a', True), {'x': 1}), Err( '', [ { 'type': 'unexpected_keyword_argument', 'loc': ('x',), 'msg': 'Unexpected keyword argument', 'input': 1, } ], ), ], [ [1], Err( '', [ { 'type': 'missing_positional_only_argument', 'loc': (1,), 'msg': 'Missing required positional only argument', 'input': [1], }, { 'type': 'missing_positional_only_argument', 'loc': (2,), 'msg': 'Missing required positional only argument', 'input': [1], }, ], ), ], [ [1, 'a', True, 4], Err( '', [ { 'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4, } ], ), ], [ [1, 'a', True, 4, 5], Err( '', [ { 'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4, }, { 'type': 'unexpected_positional_argument', 'loc': (4,), 'msg': 'Unexpected positional argument', 'input': 5, }, ], ), ], [ ('x', 'a', 'wrong'), Err( '', [ { 'type': 'int_parsing', 'loc': (0,), 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': 'x', }, { 'type': 'bool_parsing', 'loc': (2,), 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': 'wrong', }, ], ), ], [ ArgsKwargs(()), Err( '3 validation errors for arguments', [ { 'type': 'missing_positional_only_argument', 'loc': (0,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_positional_only_argument', 'loc': (1,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_positional_only_argument', 'loc': (2,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, ], ), ], ], ids=repr, ) def test_positional_args(py_and_json: PyAndJson, input_value, expected): v = py_and_json( { 'type': 'arguments', 'arguments_schema': [ {'name': 'a', 'mode': 'positional_only', 'schema': {'type': 'int'}}, {'name': 'b', 'mode': 'positional_only', 'schema': {'type': 'str'}}, {'name': 'c', 'mode': 'positional_only', 'schema': {'type': 'bool'}}, ], } ) if isinstance(expected, Err): > with pytest.raises(ValidationError, match=re.escape(expected.message)) as exc_info: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/validators/test_arguments.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/_pytest/raises.py:624: in __init__ super().__init__(match=match, check=check) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <[AttributeError("'RaisesExc' object has no attribute 'expected_exceptions'") raised in repr()] RaisesExc object at 0xf4542858> def __init__( self, *, match: str | Pattern[str] | None, check: Callable[[BaseExcT_co], bool] | None, ) -> None: if isinstance(match, str): # juggle error in order to avoid context to fail (necessary?) re_error = None try: self.match: Pattern[str] | None = re.compile(match) except re.error as e: re_error = e if re_error is not None: fail(f"Invalid regex pattern provided to 'match': {re_error}") if match == "": > warnings.warn( PytestWarning( "matching against an empty string will *always* pass. If you want " "to check for an empty message you need to pass '^$'. If you don't " "want to match you should pass `None` or leave out the parameter." ), stacklevel=2, ) E pytest.PytestWarning: matching against an empty string will *always* pass. If you want to check for an empty message you need to pass '^$'. If you don't want to match you should pass `None` or leave out the parameter. /usr/lib/python3.12/site-packages/_pytest/raises.py:401: PytestWarning _ test_positional_args[json-ArgsKwargs((1, 'a', True), {'x': 1})-Err('', errors=[{'type': 'unexpected_keyword_argument', 'loc': ('x',), 'msg': 'Unexpected keyword argument', 'input': 1}])] _ py_and_json = .ChosenPyAndJsonValidator'> input_value = ArgsKwargs((1, 'a', True), {'x': 1}) expected = Err('', errors=[{'type': 'unexpected_keyword_argument', 'loc': ('x',), 'msg': 'Unexpected keyword argument', 'input': 1}]) @pytest.mark.parametrize( 'input_value,expected', [ [(1, 'a', True), ((1, 'a', True), {})], [[1, 'a', True], ((1, 'a', True), {})], [ArgsKwargs((1, 'a', True)), ((1, 'a', True), {})], [(1, 'a', 'true'), ((1, 'a', True), {})], ['x', Err('type=arguments_type,')], [ ArgsKwargs((1, 'a', True), {'x': 1}), Err( '', [ { 'type': 'unexpected_keyword_argument', 'loc': ('x',), 'msg': 'Unexpected keyword argument', 'input': 1, } ], ), ], [ [1], Err( '', [ { 'type': 'missing_positional_only_argument', 'loc': (1,), 'msg': 'Missing required positional only argument', 'input': [1], }, { 'type': 'missing_positional_only_argument', 'loc': (2,), 'msg': 'Missing required positional only argument', 'input': [1], }, ], ), ], [ [1, 'a', True, 4], Err( '', [ { 'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4, } ], ), ], [ [1, 'a', True, 4, 5], Err( '', [ { 'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4, }, { 'type': 'unexpected_positional_argument', 'loc': (4,), 'msg': 'Unexpected positional argument', 'input': 5, }, ], ), ], [ ('x', 'a', 'wrong'), Err( '', [ { 'type': 'int_parsing', 'loc': (0,), 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': 'x', }, { 'type': 'bool_parsing', 'loc': (2,), 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': 'wrong', }, ], ), ], [ ArgsKwargs(()), Err( '3 validation errors for arguments', [ { 'type': 'missing_positional_only_argument', 'loc': (0,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_positional_only_argument', 'loc': (1,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_positional_only_argument', 'loc': (2,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, ], ), ], ], ids=repr, ) def test_positional_args(py_and_json: PyAndJson, input_value, expected): v = py_and_json( { 'type': 'arguments', 'arguments_schema': [ {'name': 'a', 'mode': 'positional_only', 'schema': {'type': 'int'}}, {'name': 'b', 'mode': 'positional_only', 'schema': {'type': 'str'}}, {'name': 'c', 'mode': 'positional_only', 'schema': {'type': 'bool'}}, ], } ) if isinstance(expected, Err): > with pytest.raises(ValidationError, match=re.escape(expected.message)) as exc_info: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/validators/test_arguments.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/_pytest/raises.py:624: in __init__ super().__init__(match=match, check=check) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <[AttributeError("'RaisesExc' object has no attribute 'expected_exceptions'") raised in repr()] RaisesExc object at 0xf4545ab0> def __init__( self, *, match: str | Pattern[str] | None, check: Callable[[BaseExcT_co], bool] | None, ) -> None: if isinstance(match, str): # juggle error in order to avoid context to fail (necessary?) re_error = None try: self.match: Pattern[str] | None = re.compile(match) except re.error as e: re_error = e if re_error is not None: fail(f"Invalid regex pattern provided to 'match': {re_error}") if match == "": > warnings.warn( PytestWarning( "matching against an empty string will *always* pass. If you want " "to check for an empty message you need to pass '^$'. If you don't " "want to match you should pass `None` or leave out the parameter." ), stacklevel=2, ) E pytest.PytestWarning: matching against an empty string will *always* pass. If you want to check for an empty message you need to pass '^$'. If you don't want to match you should pass `None` or leave out the parameter. /usr/lib/python3.12/site-packages/_pytest/raises.py:401: PytestWarning _ test_positional_args[json-[1]-Err('', errors=[{'type': 'missing_positional_only_argument', 'loc': (1,), 'msg': 'Missing required positional only argument', 'input': [1]}, {'type': 'missing_positional_only_argument', 'loc': (2,), 'msg': 'Missing required positional only argument', 'input': [1]}])] _ py_and_json = .ChosenPyAndJsonValidator'> input_value = [1] expected = Err('', errors=[{'type': 'missing_positional_only_argument', 'loc': (1,), 'msg': 'Missing required positional only arg...': 'missing_positional_only_argument', 'loc': (2,), 'msg': 'Missing required positional only argument', 'input': [1]}]) @pytest.mark.parametrize( 'input_value,expected', [ [(1, 'a', True), ((1, 'a', True), {})], [[1, 'a', True], ((1, 'a', True), {})], [ArgsKwargs((1, 'a', True)), ((1, 'a', True), {})], [(1, 'a', 'true'), ((1, 'a', True), {})], ['x', Err('type=arguments_type,')], [ ArgsKwargs((1, 'a', True), {'x': 1}), Err( '', [ { 'type': 'unexpected_keyword_argument', 'loc': ('x',), 'msg': 'Unexpected keyword argument', 'input': 1, } ], ), ], [ [1], Err( '', [ { 'type': 'missing_positional_only_argument', 'loc': (1,), 'msg': 'Missing required positional only argument', 'input': [1], }, { 'type': 'missing_positional_only_argument', 'loc': (2,), 'msg': 'Missing required positional only argument', 'input': [1], }, ], ), ], [ [1, 'a', True, 4], Err( '', [ { 'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4, } ], ), ], [ [1, 'a', True, 4, 5], Err( '', [ { 'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4, }, { 'type': 'unexpected_positional_argument', 'loc': (4,), 'msg': 'Unexpected positional argument', 'input': 5, }, ], ), ], [ ('x', 'a', 'wrong'), Err( '', [ { 'type': 'int_parsing', 'loc': (0,), 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': 'x', }, { 'type': 'bool_parsing', 'loc': (2,), 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': 'wrong', }, ], ), ], [ ArgsKwargs(()), Err( '3 validation errors for arguments', [ { 'type': 'missing_positional_only_argument', 'loc': (0,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_positional_only_argument', 'loc': (1,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_positional_only_argument', 'loc': (2,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, ], ), ], ], ids=repr, ) def test_positional_args(py_and_json: PyAndJson, input_value, expected): v = py_and_json( { 'type': 'arguments', 'arguments_schema': [ {'name': 'a', 'mode': 'positional_only', 'schema': {'type': 'int'}}, {'name': 'b', 'mode': 'positional_only', 'schema': {'type': 'str'}}, {'name': 'c', 'mode': 'positional_only', 'schema': {'type': 'bool'}}, ], } ) if isinstance(expected, Err): > with pytest.raises(ValidationError, match=re.escape(expected.message)) as exc_info: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/validators/test_arguments.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/_pytest/raises.py:624: in __init__ super().__init__(match=match, check=check) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <[AttributeError("'RaisesExc' object has no attribute 'expected_exceptions'") raised in repr()] RaisesExc object at 0xf4540888> def __init__( self, *, match: str | Pattern[str] | None, check: Callable[[BaseExcT_co], bool] | None, ) -> None: if isinstance(match, str): # juggle error in order to avoid context to fail (necessary?) re_error = None try: self.match: Pattern[str] | None = re.compile(match) except re.error as e: re_error = e if re_error is not None: fail(f"Invalid regex pattern provided to 'match': {re_error}") if match == "": > warnings.warn( PytestWarning( "matching against an empty string will *always* pass. If you want " "to check for an empty message you need to pass '^$'. If you don't " "want to match you should pass `None` or leave out the parameter." ), stacklevel=2, ) E pytest.PytestWarning: matching against an empty string will *always* pass. If you want to check for an empty message you need to pass '^$'. If you don't want to match you should pass `None` or leave out the parameter. /usr/lib/python3.12/site-packages/_pytest/raises.py:401: PytestWarning _ test_positional_args[json-[1, 'a', True, 4]-Err('', errors=[{'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4}])] _ py_and_json = .ChosenPyAndJsonValidator'> input_value = [1, 'a', True, 4] expected = Err('', errors=[{'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4}]) @pytest.mark.parametrize( 'input_value,expected', [ [(1, 'a', True), ((1, 'a', True), {})], [[1, 'a', True], ((1, 'a', True), {})], [ArgsKwargs((1, 'a', True)), ((1, 'a', True), {})], [(1, 'a', 'true'), ((1, 'a', True), {})], ['x', Err('type=arguments_type,')], [ ArgsKwargs((1, 'a', True), {'x': 1}), Err( '', [ { 'type': 'unexpected_keyword_argument', 'loc': ('x',), 'msg': 'Unexpected keyword argument', 'input': 1, } ], ), ], [ [1], Err( '', [ { 'type': 'missing_positional_only_argument', 'loc': (1,), 'msg': 'Missing required positional only argument', 'input': [1], }, { 'type': 'missing_positional_only_argument', 'loc': (2,), 'msg': 'Missing required positional only argument', 'input': [1], }, ], ), ], [ [1, 'a', True, 4], Err( '', [ { 'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4, } ], ), ], [ [1, 'a', True, 4, 5], Err( '', [ { 'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4, }, { 'type': 'unexpected_positional_argument', 'loc': (4,), 'msg': 'Unexpected positional argument', 'input': 5, }, ], ), ], [ ('x', 'a', 'wrong'), Err( '', [ { 'type': 'int_parsing', 'loc': (0,), 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': 'x', }, { 'type': 'bool_parsing', 'loc': (2,), 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': 'wrong', }, ], ), ], [ ArgsKwargs(()), Err( '3 validation errors for arguments', [ { 'type': 'missing_positional_only_argument', 'loc': (0,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_positional_only_argument', 'loc': (1,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_positional_only_argument', 'loc': (2,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, ], ), ], ], ids=repr, ) def test_positional_args(py_and_json: PyAndJson, input_value, expected): v = py_and_json( { 'type': 'arguments', 'arguments_schema': [ {'name': 'a', 'mode': 'positional_only', 'schema': {'type': 'int'}}, {'name': 'b', 'mode': 'positional_only', 'schema': {'type': 'str'}}, {'name': 'c', 'mode': 'positional_only', 'schema': {'type': 'bool'}}, ], } ) if isinstance(expected, Err): > with pytest.raises(ValidationError, match=re.escape(expected.message)) as exc_info: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/validators/test_arguments.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/_pytest/raises.py:624: in __init__ super().__init__(match=match, check=check) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <[AttributeError("'RaisesExc' object has no attribute 'expected_exceptions'") raised in repr()] RaisesExc object at 0xf4542888> def __init__( self, *, match: str | Pattern[str] | None, check: Callable[[BaseExcT_co], bool] | None, ) -> None: if isinstance(match, str): # juggle error in order to avoid context to fail (necessary?) re_error = None try: self.match: Pattern[str] | None = re.compile(match) except re.error as e: re_error = e if re_error is not None: fail(f"Invalid regex pattern provided to 'match': {re_error}") if match == "": > warnings.warn( PytestWarning( "matching against an empty string will *always* pass. If you want " "to check for an empty message you need to pass '^$'. If you don't " "want to match you should pass `None` or leave out the parameter." ), stacklevel=2, ) E pytest.PytestWarning: matching against an empty string will *always* pass. If you want to check for an empty message you need to pass '^$'. If you don't want to match you should pass `None` or leave out the parameter. /usr/lib/python3.12/site-packages/_pytest/raises.py:401: PytestWarning _ test_positional_args[json-[1, 'a', True, 4, 5]-Err('', errors=[{'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4}, {'type': 'unexpected_positional_argument', 'loc': (4,), 'msg': 'Unexpected positional argument', 'input': 5}])] _ py_and_json = .ChosenPyAndJsonValidator'> input_value = [1, 'a', True, 4, 5] expected = Err('', errors=[{'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4}, {'type': 'unexpected_positional_argument', 'loc': (4,), 'msg': 'Unexpected positional argument', 'input': 5}]) @pytest.mark.parametrize( 'input_value,expected', [ [(1, 'a', True), ((1, 'a', True), {})], [[1, 'a', True], ((1, 'a', True), {})], [ArgsKwargs((1, 'a', True)), ((1, 'a', True), {})], [(1, 'a', 'true'), ((1, 'a', True), {})], ['x', Err('type=arguments_type,')], [ ArgsKwargs((1, 'a', True), {'x': 1}), Err( '', [ { 'type': 'unexpected_keyword_argument', 'loc': ('x',), 'msg': 'Unexpected keyword argument', 'input': 1, } ], ), ], [ [1], Err( '', [ { 'type': 'missing_positional_only_argument', 'loc': (1,), 'msg': 'Missing required positional only argument', 'input': [1], }, { 'type': 'missing_positional_only_argument', 'loc': (2,), 'msg': 'Missing required positional only argument', 'input': [1], }, ], ), ], [ [1, 'a', True, 4], Err( '', [ { 'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4, } ], ), ], [ [1, 'a', True, 4, 5], Err( '', [ { 'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4, }, { 'type': 'unexpected_positional_argument', 'loc': (4,), 'msg': 'Unexpected positional argument', 'input': 5, }, ], ), ], [ ('x', 'a', 'wrong'), Err( '', [ { 'type': 'int_parsing', 'loc': (0,), 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': 'x', }, { 'type': 'bool_parsing', 'loc': (2,), 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': 'wrong', }, ], ), ], [ ArgsKwargs(()), Err( '3 validation errors for arguments', [ { 'type': 'missing_positional_only_argument', 'loc': (0,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_positional_only_argument', 'loc': (1,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_positional_only_argument', 'loc': (2,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, ], ), ], ], ids=repr, ) def test_positional_args(py_and_json: PyAndJson, input_value, expected): v = py_and_json( { 'type': 'arguments', 'arguments_schema': [ {'name': 'a', 'mode': 'positional_only', 'schema': {'type': 'int'}}, {'name': 'b', 'mode': 'positional_only', 'schema': {'type': 'str'}}, {'name': 'c', 'mode': 'positional_only', 'schema': {'type': 'bool'}}, ], } ) if isinstance(expected, Err): > with pytest.raises(ValidationError, match=re.escape(expected.message)) as exc_info: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/validators/test_arguments.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/_pytest/raises.py:624: in __init__ super().__init__(match=match, check=check) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <[AttributeError("'RaisesExc' object has no attribute 'expected_exceptions'") raised in repr()] RaisesExc object at 0xf4542648> def __init__( self, *, match: str | Pattern[str] | None, check: Callable[[BaseExcT_co], bool] | None, ) -> None: if isinstance(match, str): # juggle error in order to avoid context to fail (necessary?) re_error = None try: self.match: Pattern[str] | None = re.compile(match) except re.error as e: re_error = e if re_error is not None: fail(f"Invalid regex pattern provided to 'match': {re_error}") if match == "": > warnings.warn( PytestWarning( "matching against an empty string will *always* pass. If you want " "to check for an empty message you need to pass '^$'. If you don't " "want to match you should pass `None` or leave out the parameter." ), stacklevel=2, ) E pytest.PytestWarning: matching against an empty string will *always* pass. If you want to check for an empty message you need to pass '^$'. If you don't want to match you should pass `None` or leave out the parameter. /usr/lib/python3.12/site-packages/_pytest/raises.py:401: PytestWarning _ test_positional_args[json-('x', 'a', 'wrong')-Err('', errors=[{'type': 'int_parsing', 'loc': (0,), 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': 'x'}, {'type': 'bool_parsing', 'loc': (2,), 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': 'wrong'}])] _ py_and_json = .ChosenPyAndJsonValidator'> input_value = ('x', 'a', 'wrong') expected = Err('', errors=[{'type': 'int_parsing', 'loc': (0,), 'msg': 'Input should be a valid integer, unable to parse string a...: 'bool_parsing', 'loc': (2,), 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': 'wrong'}]) @pytest.mark.parametrize( 'input_value,expected', [ [(1, 'a', True), ((1, 'a', True), {})], [[1, 'a', True], ((1, 'a', True), {})], [ArgsKwargs((1, 'a', True)), ((1, 'a', True), {})], [(1, 'a', 'true'), ((1, 'a', True), {})], ['x', Err('type=arguments_type,')], [ ArgsKwargs((1, 'a', True), {'x': 1}), Err( '', [ { 'type': 'unexpected_keyword_argument', 'loc': ('x',), 'msg': 'Unexpected keyword argument', 'input': 1, } ], ), ], [ [1], Err( '', [ { 'type': 'missing_positional_only_argument', 'loc': (1,), 'msg': 'Missing required positional only argument', 'input': [1], }, { 'type': 'missing_positional_only_argument', 'loc': (2,), 'msg': 'Missing required positional only argument', 'input': [1], }, ], ), ], [ [1, 'a', True, 4], Err( '', [ { 'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4, } ], ), ], [ [1, 'a', True, 4, 5], Err( '', [ { 'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4, }, { 'type': 'unexpected_positional_argument', 'loc': (4,), 'msg': 'Unexpected positional argument', 'input': 5, }, ], ), ], [ ('x', 'a', 'wrong'), Err( '', [ { 'type': 'int_parsing', 'loc': (0,), 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': 'x', }, { 'type': 'bool_parsing', 'loc': (2,), 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': 'wrong', }, ], ), ], [ ArgsKwargs(()), Err( '3 validation errors for arguments', [ { 'type': 'missing_positional_only_argument', 'loc': (0,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_positional_only_argument', 'loc': (1,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_positional_only_argument', 'loc': (2,), 'msg': 'Missing required positional only argument', 'input': ArgsKwargs(()), }, ], ), ], ], ids=repr, ) def test_positional_args(py_and_json: PyAndJson, input_value, expected): v = py_and_json( { 'type': 'arguments', 'arguments_schema': [ {'name': 'a', 'mode': 'positional_only', 'schema': {'type': 'int'}}, {'name': 'b', 'mode': 'positional_only', 'schema': {'type': 'str'}}, {'name': 'c', 'mode': 'positional_only', 'schema': {'type': 'bool'}}, ], } ) if isinstance(expected, Err): > with pytest.raises(ValidationError, match=re.escape(expected.message)) as exc_info: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/validators/test_arguments.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/_pytest/raises.py:624: in __init__ super().__init__(match=match, check=check) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <[AttributeError("'RaisesExc' object has no attribute 'expected_exceptions'") raised in repr()] RaisesExc object at 0xf49330f0> def __init__( self, *, match: str | Pattern[str] | None, check: Callable[[BaseExcT_co], bool] | None, ) -> None: if isinstance(match, str): # juggle error in order to avoid context to fail (necessary?) re_error = None try: self.match: Pattern[str] | None = re.compile(match) except re.error as e: re_error = e if re_error is not None: fail(f"Invalid regex pattern provided to 'match': {re_error}") if match == "": > warnings.warn( PytestWarning( "matching against an empty string will *always* pass. If you want " "to check for an empty message you need to pass '^$'. If you don't " "want to match you should pass `None` or leave out the parameter." ), stacklevel=2, ) E pytest.PytestWarning: matching against an empty string will *always* pass. If you want to check for an empty message you need to pass '^$'. If you don't want to match you should pass `None` or leave out the parameter. /usr/lib/python3.12/site-packages/_pytest/raises.py:401: PytestWarning _ test_keyword_args[python-ArgsKwargs((), {'a': 'x', 'b': 'a', 'c': 'wrong'})-Err('', errors=[{'type': 'int_parsing', 'loc': ('a',), 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': 'x'}, {'type': 'bool_parsing', 'loc': ('c',), 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': 'wrong'}])] _ py_and_json = .ChosenPyAndJsonValidator'> input_value = ArgsKwargs((), {'a': 'x', 'b': 'a', 'c': 'wrong'}) expected = Err('', errors=[{'type': 'int_parsing', 'loc': ('a',), 'msg': 'Input should be a valid integer, unable to parse string...'bool_parsing', 'loc': ('c',), 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': 'wrong'}]) @pytest.mark.parametrize( 'input_value,expected', [ [ArgsKwargs((), {'a': 1, 'b': 'a', 'c': True}), ((), {'a': 1, 'b': 'a', 'c': True})], [{'a': 1, 'b': 'a', 'c': True}, ((), {'a': 1, 'b': 'a', 'c': True})], [ArgsKwargs((), {'a': '1', 'b': 'a', 'c': 'True'}), ((), {'a': 1, 'b': 'a', 'c': True})], [ArgsKwargs((), {'a': 1, 'b': 'a', 'c': True}), ((), {'a': 1, 'b': 'a', 'c': True})], [ArgsKwargs((1,), {'a': 1, 'b': 'a', 'c': True}), Err('type=unexpected_positional_argument,')], [ ArgsKwargs((), {'a': 1, 'b': 'a', 'c': True, 'd': 'wrong'}), Err( 'type=unexpected_keyword_argument,', [ { 'type': 'unexpected_keyword_argument', 'loc': ('d',), 'msg': 'Unexpected keyword argument', 'input': 'wrong', } ], ), ], [ ArgsKwargs((), {'a': 1, 'b': 'a'}), Err( 'type=missing_keyword_only_argument,', [ { 'type': 'missing_keyword_only_argument', 'loc': ('c',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs((), {'a': 1, 'b': 'a'}), } ], ), ], [ ArgsKwargs((), {'a': 'x', 'b': 'a', 'c': 'wrong'}), Err( '', [ { 'type': 'int_parsing', 'loc': ('a',), 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': 'x', }, { 'type': 'bool_parsing', 'loc': ('c',), 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': 'wrong', }, ], ), ], [ ArgsKwargs(()), Err( '', [ { 'type': 'missing_keyword_only_argument', 'loc': ('a',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_keyword_only_argument', 'loc': ('b',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_keyword_only_argument', 'loc': ('c',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs(()), }, ], ), ], ], ids=repr, ) def test_keyword_args(py_and_json: PyAndJson, input_value, expected): v = py_and_json( { 'type': 'arguments', 'arguments_schema': [ {'name': 'a', 'mode': 'keyword_only', 'schema': {'type': 'int'}}, {'name': 'b', 'mode': 'keyword_only', 'schema': {'type': 'str'}}, {'name': 'c', 'mode': 'keyword_only', 'schema': {'type': 'bool'}}, ], } ) if isinstance(expected, Err): > with pytest.raises(ValidationError, match=re.escape(expected.message)) as exc_info: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/validators/test_arguments.py:280: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/_pytest/raises.py:624: in __init__ super().__init__(match=match, check=check) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <[AttributeError("'RaisesExc' object has no attribute 'expected_exceptions'") raised in repr()] RaisesExc object at 0xf4525798> def __init__( self, *, match: str | Pattern[str] | None, check: Callable[[BaseExcT_co], bool] | None, ) -> None: if isinstance(match, str): # juggle error in order to avoid context to fail (necessary?) re_error = None try: self.match: Pattern[str] | None = re.compile(match) except re.error as e: re_error = e if re_error is not None: fail(f"Invalid regex pattern provided to 'match': {re_error}") if match == "": > warnings.warn( PytestWarning( "matching against an empty string will *always* pass. If you want " "to check for an empty message you need to pass '^$'. If you don't " "want to match you should pass `None` or leave out the parameter." ), stacklevel=2, ) E pytest.PytestWarning: matching against an empty string will *always* pass. If you want to check for an empty message you need to pass '^$'. If you don't want to match you should pass `None` or leave out the parameter. /usr/lib/python3.12/site-packages/_pytest/raises.py:401: PytestWarning _ test_keyword_args[python-ArgsKwargs(())-Err('', errors=[{'type': 'missing_keyword_only_argument', 'loc': ('a',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs(())}, {'type': 'missing_keyword_only_argument', 'loc': ('b',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs(())}, {'type': 'missing_keyword_only_argument', 'loc': ('c',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs(())}])] _ py_and_json = .ChosenPyAndJsonValidator'> input_value = ArgsKwargs(()) expected = Err('', errors=[{'type': 'missing_keyword_only_argument', 'loc': ('a',), 'msg': 'Missing required keyword only argumen...sing_keyword_only_argument', 'loc': ('c',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs(())}]) @pytest.mark.parametrize( 'input_value,expected', [ [ArgsKwargs((), {'a': 1, 'b': 'a', 'c': True}), ((), {'a': 1, 'b': 'a', 'c': True})], [{'a': 1, 'b': 'a', 'c': True}, ((), {'a': 1, 'b': 'a', 'c': True})], [ArgsKwargs((), {'a': '1', 'b': 'a', 'c': 'True'}), ((), {'a': 1, 'b': 'a', 'c': True})], [ArgsKwargs((), {'a': 1, 'b': 'a', 'c': True}), ((), {'a': 1, 'b': 'a', 'c': True})], [ArgsKwargs((1,), {'a': 1, 'b': 'a', 'c': True}), Err('type=unexpected_positional_argument,')], [ ArgsKwargs((), {'a': 1, 'b': 'a', 'c': True, 'd': 'wrong'}), Err( 'type=unexpected_keyword_argument,', [ { 'type': 'unexpected_keyword_argument', 'loc': ('d',), 'msg': 'Unexpected keyword argument', 'input': 'wrong', } ], ), ], [ ArgsKwargs((), {'a': 1, 'b': 'a'}), Err( 'type=missing_keyword_only_argument,', [ { 'type': 'missing_keyword_only_argument', 'loc': ('c',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs((), {'a': 1, 'b': 'a'}), } ], ), ], [ ArgsKwargs((), {'a': 'x', 'b': 'a', 'c': 'wrong'}), Err( '', [ { 'type': 'int_parsing', 'loc': ('a',), 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': 'x', }, { 'type': 'bool_parsing', 'loc': ('c',), 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': 'wrong', }, ], ), ], [ ArgsKwargs(()), Err( '', [ { 'type': 'missing_keyword_only_argument', 'loc': ('a',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_keyword_only_argument', 'loc': ('b',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_keyword_only_argument', 'loc': ('c',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs(()), }, ], ), ], ], ids=repr, ) def test_keyword_args(py_and_json: PyAndJson, input_value, expected): v = py_and_json( { 'type': 'arguments', 'arguments_schema': [ {'name': 'a', 'mode': 'keyword_only', 'schema': {'type': 'int'}}, {'name': 'b', 'mode': 'keyword_only', 'schema': {'type': 'str'}}, {'name': 'c', 'mode': 'keyword_only', 'schema': {'type': 'bool'}}, ], } ) if isinstance(expected, Err): > with pytest.raises(ValidationError, match=re.escape(expected.message)) as exc_info: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/validators/test_arguments.py:280: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/_pytest/raises.py:624: in __init__ super().__init__(match=match, check=check) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <[AttributeError("'RaisesExc' object has no attribute 'expected_exceptions'") raised in repr()] RaisesExc object at 0xf4545630> def __init__( self, *, match: str | Pattern[str] | None, check: Callable[[BaseExcT_co], bool] | None, ) -> None: if isinstance(match, str): # juggle error in order to avoid context to fail (necessary?) re_error = None try: self.match: Pattern[str] | None = re.compile(match) except re.error as e: re_error = e if re_error is not None: fail(f"Invalid regex pattern provided to 'match': {re_error}") if match == "": > warnings.warn( PytestWarning( "matching against an empty string will *always* pass. If you want " "to check for an empty message you need to pass '^$'. If you don't " "want to match you should pass `None` or leave out the parameter." ), stacklevel=2, ) E pytest.PytestWarning: matching against an empty string will *always* pass. If you want to check for an empty message you need to pass '^$'. If you don't want to match you should pass `None` or leave out the parameter. /usr/lib/python3.12/site-packages/_pytest/raises.py:401: PytestWarning _ test_keyword_args[json-ArgsKwargs((), {'a': 'x', 'b': 'a', 'c': 'wrong'})-Err('', errors=[{'type': 'int_parsing', 'loc': ('a',), 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': 'x'}, {'type': 'bool_parsing', 'loc': ('c',), 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': 'wrong'}])] _ py_and_json = .ChosenPyAndJsonValidator'> input_value = ArgsKwargs((), {'a': 'x', 'b': 'a', 'c': 'wrong'}) expected = Err('', errors=[{'type': 'int_parsing', 'loc': ('a',), 'msg': 'Input should be a valid integer, unable to parse string...'bool_parsing', 'loc': ('c',), 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': 'wrong'}]) @pytest.mark.parametrize( 'input_value,expected', [ [ArgsKwargs((), {'a': 1, 'b': 'a', 'c': True}), ((), {'a': 1, 'b': 'a', 'c': True})], [{'a': 1, 'b': 'a', 'c': True}, ((), {'a': 1, 'b': 'a', 'c': True})], [ArgsKwargs((), {'a': '1', 'b': 'a', 'c': 'True'}), ((), {'a': 1, 'b': 'a', 'c': True})], [ArgsKwargs((), {'a': 1, 'b': 'a', 'c': True}), ((), {'a': 1, 'b': 'a', 'c': True})], [ArgsKwargs((1,), {'a': 1, 'b': 'a', 'c': True}), Err('type=unexpected_positional_argument,')], [ ArgsKwargs((), {'a': 1, 'b': 'a', 'c': True, 'd': 'wrong'}), Err( 'type=unexpected_keyword_argument,', [ { 'type': 'unexpected_keyword_argument', 'loc': ('d',), 'msg': 'Unexpected keyword argument', 'input': 'wrong', } ], ), ], [ ArgsKwargs((), {'a': 1, 'b': 'a'}), Err( 'type=missing_keyword_only_argument,', [ { 'type': 'missing_keyword_only_argument', 'loc': ('c',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs((), {'a': 1, 'b': 'a'}), } ], ), ], [ ArgsKwargs((), {'a': 'x', 'b': 'a', 'c': 'wrong'}), Err( '', [ { 'type': 'int_parsing', 'loc': ('a',), 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': 'x', }, { 'type': 'bool_parsing', 'loc': ('c',), 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': 'wrong', }, ], ), ], [ ArgsKwargs(()), Err( '', [ { 'type': 'missing_keyword_only_argument', 'loc': ('a',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_keyword_only_argument', 'loc': ('b',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_keyword_only_argument', 'loc': ('c',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs(()), }, ], ), ], ], ids=repr, ) def test_keyword_args(py_and_json: PyAndJson, input_value, expected): v = py_and_json( { 'type': 'arguments', 'arguments_schema': [ {'name': 'a', 'mode': 'keyword_only', 'schema': {'type': 'int'}}, {'name': 'b', 'mode': 'keyword_only', 'schema': {'type': 'str'}}, {'name': 'c', 'mode': 'keyword_only', 'schema': {'type': 'bool'}}, ], } ) if isinstance(expected, Err): > with pytest.raises(ValidationError, match=re.escape(expected.message)) as exc_info: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/validators/test_arguments.py:280: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/_pytest/raises.py:624: in __init__ super().__init__(match=match, check=check) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <[AttributeError("'RaisesExc' object has no attribute 'expected_exceptions'") raised in repr()] RaisesExc object at 0xf4542b70> def __init__( self, *, match: str | Pattern[str] | None, check: Callable[[BaseExcT_co], bool] | None, ) -> None: if isinstance(match, str): # juggle error in order to avoid context to fail (necessary?) re_error = None try: self.match: Pattern[str] | None = re.compile(match) except re.error as e: re_error = e if re_error is not None: fail(f"Invalid regex pattern provided to 'match': {re_error}") if match == "": > warnings.warn( PytestWarning( "matching against an empty string will *always* pass. If you want " "to check for an empty message you need to pass '^$'. If you don't " "want to match you should pass `None` or leave out the parameter." ), stacklevel=2, ) E pytest.PytestWarning: matching against an empty string will *always* pass. If you want to check for an empty message you need to pass '^$'. If you don't want to match you should pass `None` or leave out the parameter. /usr/lib/python3.12/site-packages/_pytest/raises.py:401: PytestWarning _ test_keyword_args[json-ArgsKwargs(())-Err('', errors=[{'type': 'missing_keyword_only_argument', 'loc': ('a',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs(())}, {'type': 'missing_keyword_only_argument', 'loc': ('b',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs(())}, {'type': 'missing_keyword_only_argument', 'loc': ('c',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs(())}])] _ py_and_json = .ChosenPyAndJsonValidator'> input_value = ArgsKwargs(()) expected = Err('', errors=[{'type': 'missing_keyword_only_argument', 'loc': ('a',), 'msg': 'Missing required keyword only argumen...sing_keyword_only_argument', 'loc': ('c',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs(())}]) @pytest.mark.parametrize( 'input_value,expected', [ [ArgsKwargs((), {'a': 1, 'b': 'a', 'c': True}), ((), {'a': 1, 'b': 'a', 'c': True})], [{'a': 1, 'b': 'a', 'c': True}, ((), {'a': 1, 'b': 'a', 'c': True})], [ArgsKwargs((), {'a': '1', 'b': 'a', 'c': 'True'}), ((), {'a': 1, 'b': 'a', 'c': True})], [ArgsKwargs((), {'a': 1, 'b': 'a', 'c': True}), ((), {'a': 1, 'b': 'a', 'c': True})], [ArgsKwargs((1,), {'a': 1, 'b': 'a', 'c': True}), Err('type=unexpected_positional_argument,')], [ ArgsKwargs((), {'a': 1, 'b': 'a', 'c': True, 'd': 'wrong'}), Err( 'type=unexpected_keyword_argument,', [ { 'type': 'unexpected_keyword_argument', 'loc': ('d',), 'msg': 'Unexpected keyword argument', 'input': 'wrong', } ], ), ], [ ArgsKwargs((), {'a': 1, 'b': 'a'}), Err( 'type=missing_keyword_only_argument,', [ { 'type': 'missing_keyword_only_argument', 'loc': ('c',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs((), {'a': 1, 'b': 'a'}), } ], ), ], [ ArgsKwargs((), {'a': 'x', 'b': 'a', 'c': 'wrong'}), Err( '', [ { 'type': 'int_parsing', 'loc': ('a',), 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': 'x', }, { 'type': 'bool_parsing', 'loc': ('c',), 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': 'wrong', }, ], ), ], [ ArgsKwargs(()), Err( '', [ { 'type': 'missing_keyword_only_argument', 'loc': ('a',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_keyword_only_argument', 'loc': ('b',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs(()), }, { 'type': 'missing_keyword_only_argument', 'loc': ('c',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs(()), }, ], ), ], ], ids=repr, ) def test_keyword_args(py_and_json: PyAndJson, input_value, expected): v = py_and_json( { 'type': 'arguments', 'arguments_schema': [ {'name': 'a', 'mode': 'keyword_only', 'schema': {'type': 'int'}}, {'name': 'b', 'mode': 'keyword_only', 'schema': {'type': 'str'}}, {'name': 'c', 'mode': 'keyword_only', 'schema': {'type': 'bool'}}, ], } ) if isinstance(expected, Err): > with pytest.raises(ValidationError, match=re.escape(expected.message)) as exc_info: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/validators/test_arguments.py:280: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.12/site-packages/_pytest/raises.py:624: in __init__ super().__init__(match=match, check=check) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <[AttributeError("'RaisesExc' object has no attribute 'expected_exceptions'") raised in repr()] RaisesExc object at 0xf492c798> def __init__( self, *, match: str | Pattern[str] | None, check: Callable[[BaseExcT_co], bool] | None, ) -> None: if isinstance(match, str): # juggle error in order to avoid context to fail (necessary?) re_error = None try: self.match: Pattern[str] | None = re.compile(match) except re.error as e: re_error = e if re_error is not None: fail(f"Invalid regex pattern provided to 'match': {re_error}") if match == "": > warnings.warn( PytestWarning( "matching against an empty string will *always* pass. If you want " "to check for an empty message you need to pass '^$'. If you don't " "want to match you should pass `None` or leave out the parameter." ), stacklevel=2, ) E pytest.PytestWarning: matching against an empty string will *always* pass. If you want to check for an empty message you need to pass '^$'. If you don't want to match you should pass `None` or leave out the parameter. /usr/lib/python3.12/site-packages/_pytest/raises.py:401: PytestWarning =========================== short test summary info ============================ FAILED tests/validators/test_arguments.py::test_positional_args[python-ArgsKwargs((1, 'a', True), {'x': 1})-Err('', errors=[{'type': 'unexpected_keyword_argument', 'loc': ('x',), 'msg': 'Unexpected keyword argument', 'input': 1}])] FAILED tests/validators/test_arguments.py::test_positional_args[python-[1]-Err('', errors=[{'type': 'missing_positional_only_argument', 'loc': (1,), 'msg': 'Missing required positional only argument', 'input': [1]}, {'type': 'missing_positional_only_argument', 'loc': (2,), 'msg': 'Missing required positional only argument', 'input': [1]}])] FAILED tests/validators/test_arguments.py::test_positional_args[python-[1, 'a', True, 4]-Err('', errors=[{'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4}])] FAILED tests/validators/test_arguments.py::test_positional_args[python-[1, 'a', True, 4, 5]-Err('', errors=[{'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4}, {'type': 'unexpected_positional_argument', 'loc': (4,), 'msg': 'Unexpected positional argument', 'input': 5}])] FAILED tests/validators/test_arguments.py::test_positional_args[python-('x', 'a', 'wrong')-Err('', errors=[{'type': 'int_parsing', 'loc': (0,), 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': 'x'}, {'type': 'bool_parsing', 'loc': (2,), 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': 'wrong'}])] FAILED tests/validators/test_arguments.py::test_positional_args[json-ArgsKwargs((1, 'a', True), {'x': 1})-Err('', errors=[{'type': 'unexpected_keyword_argument', 'loc': ('x',), 'msg': 'Unexpected keyword argument', 'input': 1}])] FAILED tests/validators/test_arguments.py::test_positional_args[json-[1]-Err('', errors=[{'type': 'missing_positional_only_argument', 'loc': (1,), 'msg': 'Missing required positional only argument', 'input': [1]}, {'type': 'missing_positional_only_argument', 'loc': (2,), 'msg': 'Missing required positional only argument', 'input': [1]}])] FAILED tests/validators/test_arguments.py::test_positional_args[json-[1, 'a', True, 4]-Err('', errors=[{'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4}])] FAILED tests/validators/test_arguments.py::test_positional_args[json-[1, 'a', True, 4, 5]-Err('', errors=[{'type': 'unexpected_positional_argument', 'loc': (3,), 'msg': 'Unexpected positional argument', 'input': 4}, {'type': 'unexpected_positional_argument', 'loc': (4,), 'msg': 'Unexpected positional argument', 'input': 5}])] FAILED tests/validators/test_arguments.py::test_positional_args[json-('x', 'a', 'wrong')-Err('', errors=[{'type': 'int_parsing', 'loc': (0,), 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': 'x'}, {'type': 'bool_parsing', 'loc': (2,), 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': 'wrong'}])] FAILED tests/validators/test_arguments.py::test_keyword_args[python-ArgsKwargs((), {'a': 'x', 'b': 'a', 'c': 'wrong'})-Err('', errors=[{'type': 'int_parsing', 'loc': ('a',), 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': 'x'}, {'type': 'bool_parsing', 'loc': ('c',), 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': 'wrong'}])] FAILED tests/validators/test_arguments.py::test_keyword_args[python-ArgsKwargs(())-Err('', errors=[{'type': 'missing_keyword_only_argument', 'loc': ('a',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs(())}, {'type': 'missing_keyword_only_argument', 'loc': ('b',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs(())}, {'type': 'missing_keyword_only_argument', 'loc': ('c',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs(())}])] FAILED tests/validators/test_arguments.py::test_keyword_args[json-ArgsKwargs((), {'a': 'x', 'b': 'a', 'c': 'wrong'})-Err('', errors=[{'type': 'int_parsing', 'loc': ('a',), 'msg': 'Input should be a valid integer, unable to parse string as an integer', 'input': 'x'}, {'type': 'bool_parsing', 'loc': ('c',), 'msg': 'Input should be a valid boolean, unable to interpret input', 'input': 'wrong'}])] FAILED tests/validators/test_arguments.py::test_keyword_args[json-ArgsKwargs(())-Err('', errors=[{'type': 'missing_keyword_only_argument', 'loc': ('a',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs(())}, {'type': 'missing_keyword_only_argument', 'loc': ('b',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs(())}, {'type': 'missing_keyword_only_argument', 'loc': ('c',), 'msg': 'Missing required keyword only argument', 'input': ArgsKwargs(())}])] =========== 14 failed, 4528 passed, 63 skipped, 2 xfailed in 17.77s ============ >>> ERROR: py3-pydantic-core: check failed >>> py3-pydantic-core: Uninstalling dependencies... ( 1/64) Purging .makedepends-py3-pydantic-core (20251025.214332) ( 2/64) Purging py3-typing-extensions-pyc (4.15.0-r0) ( 3/64) Purging py3-typing-extensions (4.15.0-r0) ( 4/64) Purging py3-gpep517-pyc (19-r0) ( 5/64) Purging py3-gpep517 (19-r0) ( 6/64) Purging py3-maturin-pyc (1.9.6-r0) ( 7/64) Purging py3-maturin (1.9.6-r0) ( 8/64) Purging maturin (1.9.6-r0) ( 9/64) Purging py3-wheel-pyc (0.46.1-r0) (10/64) Purging py3-wheel (0.46.1-r0) (11/64) Purging py3-installer-pyc (0.7.0-r2) (12/64) Purging py3-installer (0.7.0-r2) (13/64) Purging cargo (1.90.0-r1) (14/64) Purging rust (1.90.0-r1) (15/64) Purging py3-pytest-benchmark-pyc (4.0.0-r4) (16/64) Purging py3-pytest-benchmark (4.0.0-r4) (17/64) Purging py3-py-cpuinfo-pyc (9.0.0-r4) (18/64) Purging py3-py-cpuinfo (9.0.0-r4) (19/64) Purging py3-pytest-mock-pyc (3.10.0-r4) (20/64) Purging py3-pytest-mock (3.10.0-r4) (21/64) Purging py3-mock-pyc (5.2.0-r0) (22/64) Purging py3-mock (5.2.0-r0) (23/64) Purging py3-pytest-timeout-pyc (2.3.1-r1) (24/64) Purging py3-pytest-timeout (2.3.1-r1) (25/64) Purging py3-pytest-pyc (8.4.2-r1) (26/64) Purging py3-pytest (8.4.2-r1) (27/64) Purging py3-iniconfig-pyc (2.3.0-r0) (28/64) Purging py3-iniconfig (2.3.0-r0) (29/64) Purging py3-packaging-pyc (25.0-r0) (30/64) Purging py3-packaging (25.0-r0) (31/64) Purging py3-parsing-pyc (3.2.3-r0) (32/64) Purging py3-parsing (3.2.3-r0) (33/64) Purging py3-pluggy-pyc (1.6.0-r0) (34/64) Purging py3-pluggy (1.6.0-r0) (35/64) Purging py3-py-pyc (1.11.0-r4) (36/64) Purging py3-py (1.11.0-r4) (37/64) Purging py3-pygments-pyc (2.19.2-r0) (38/64) Purging py3-pygments (2.19.2-r0) (39/64) Purging py3-hypothesis-pyc (6.140.2-r0) (40/64) Purging py3-hypothesis (6.140.2-r0) (41/64) Purging py3-sortedcontainers-pyc (2.4.0-r5) (42/64) Purging py3-sortedcontainers (2.4.0-r5) (43/64) Purging py3-dirty-equals-pyc (0.8.0-r0) (44/64) Purging py3-dirty-equals (0.8.0-r0) (45/64) Purging py3-tz-pyc (2025.2-r0) (46/64) Purging py3-tz (2025.2-r0) (47/64) Purging py3-tzdata-pyc (2025.2-r0) (48/64) Purging py3-tzdata (2025.2-r0) (49/64) Purging py3-attrs-pyc (25.3.0-r0) (50/64) Purging py3-attrs (25.3.0-r0) (51/64) Purging python3-pyc (3.12.12-r0) (52/64) Purging python3-pycache-pyc0 (3.12.12-r0) (53/64) Purging pyc (3.12.12-r0) (54/64) Purging python3 (3.12.12-r0) (55/64) Purging gdbm (1.26-r0) (56/64) Purging libbz2 (1.0.8-r6) (57/64) Purging libpanelw (6.5_p20251010-r0) (58/64) Purging llvm21-libs (21.1.2-r1) (59/64) Purging mpdecimal (4.0.1-r0) (60/64) Purging scudo-malloc (21.1.2-r0) (61/64) Purging sqlite-libs (3.50.4-r1) (62/64) Purging libffi (3.5.2-r0) (63/64) Purging libxml2 (2.13.9-r0) (64/64) Purging xz-libs (5.8.1-r0) busybox-1.37.0-r24.trigger: Executing script... OK: 426 MiB in 105 packages