Source: pydantic Version: 1.2-2 Severity: important User: pyt...@packages.debian.org Usertags: pytest-v6
Hi, pydantic FTBFS with pytest 6 in experimental. The pytest changelog may offer clues as to why: https://docs.pytest.org/en/stable/changelog.html The error log below has more details. > I: pybuild base:232: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9/build; > python3.9 -m pytest tests > ============================= test session starts > ============================== > platform linux -- Python 3.9.1, pytest-6.0.2, py-1.9.0, pluggy-0.13.0 > rootdir: /<<PKGBUILDDIR>>, configfile: setup.cfg, testpaths: tests > collected 1511 items > > tests/test_abc.py .. [ > 0%] > tests/test_callable.py .... [ > 0%] > tests/test_color.py .................................................... [ > 3%] > .................. [ > 5%] > tests/test_construction.py ................... [ > 6%] > tests/test_create_model.py .............. [ > 7%] > tests/test_dataclasses.py ............................... [ > 9%] > tests/test_datetime_parse.py ........................................... [ > 12%] > ....................................................................... [ > 16%] > tests/test_edge_cases.py ............................................... [ > 19%] > ..................................................................... [ > 24%] > tests/test_errors.py ................ [ > 25%] > tests/test_forward_ref.py ................ [ > 26%] > tests/test_generics.py ........................... [ > 28%] > tests/test_json.py ..................................... [ > 30%] > tests/test_main.py ..................................................... [ > 34%] > ................. [ > 35%] > tests/test_networks.py ................................................. [ > 38%] > ...............................ssssssssssssssssssssssssssssssssssss. [ > 43%] > tests/test_networks_ipaddress.py ....................................... [ > 45%] > ........................................................................ [ > 50%] > ............................................. [ > 53%] > tests/test_orm_mode.py .......... [ > 54%] > tests/test_parse.py .................. [ > 55%] > tests/test_schema.py .......................................ss.......... [ > 58%] > ........................................................................ [ > 63%] > .....................................................s.............. [ > 68%] > tests/test_settings.py ............................ [ > 69%] > tests/test_tools.py ......... [ > 70%] > tests/test_types.py .................................................... [ > 73%] > ...........................................................ss........... [ > 78%] > ........................................................................ [ > 83%] > ........................................................................ [ > 88%] > ......ss............... [ > 89%] > tests/test_types_payment_card_number.py .................. [ > 90%] > tests/test_utils.py ....................ss..... [ > 92%] > tests/test_validators.py ............................................... [ > 95%] > .............F.............................. [ > 98%] > tests/test_validators_dataclass.py ....... [ > 99%] > tests/mypy/test_mypy.py sssssssss... > [100%] > > =================================== FAILURES > =================================== > _____________________ test_assert_raises_validation_error > ______________________ > > def test_assert_raises_validation_error(): > class Model(BaseModel): > a: str > > @validator('a') > def check_a(cls, v): > assert v == 'a', 'invalid a' > return v > > Model(a='a') > > with pytest.raises(ValidationError) as exc_info: > Model(a='snap') > injected_by_pytest = "\nassert 'snap' == 'a'\n - snap\n + a" >> assert exc_info.value.errors() == [ > {'loc': ('a',), 'msg': f'invalid a{injected_by_pytest}', 'type': > 'assertion_error'} > ] > E assert [{'loc': ('a'...rtion_error'}] == [{'loc': > ('a'...rtion_error'}] > E At index 0 diff: {'loc': ('a',), 'msg': "invalid a\nassert 'snap' > == 'a'\n - a\n + snap", 'type': 'assertion_error'} != {'loc': ('a',), > 'msg': "invalid a\nassert 'snap' == 'a'\n - snap\n + a", 'type': > 'assertion_error'} > E Use -v to get the full diff > > tests/test_validators.py:717: AssertionError > =============================== warnings summary > =============================== > /usr/lib/python3/dist-packages/_pytest/config/__init__.py:1148 > /usr/lib/python3/dist-packages/_pytest/config/__init__.py:1148: > PytestConfigWarning: Unknown config ini key: timeout > > self._warn_or_fail_if_strict("Unknown config ini key: {}\n".format(key)) > > -- Docs: https://docs.pytest.org/en/stable/warnings.html > =========================== short test summary info > ============================ > FAILED tests/test_validators.py::test_assert_raises_validation_error - > assert... > ============ 1 failed, 1456 passed, 54 skipped, 1 warning in 2.15s > ============= > E: pybuild pybuild:353: test: plugin distutils failed with: exit code=1: cd > /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9/build; python3.9 -m pytest tests > dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.9 > returned exit code 13 > make: *** [debian/rules:8: build] Error 25 > dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2