python311Packages.pydantic: disable failing tests with pytest>=8
This commit is contained in:
committed by
Martin Weinelt
parent
91a4ba7a99
commit
26c0f4ee75
@@ -1,6 +1,7 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, pythonOlder
|
||||
|
||||
# build-system
|
||||
@@ -38,6 +39,15 @@ buildPythonPackage rec {
|
||||
hash = "sha256-neTdG/IcXopCmevzFY5/XDlhPHmOb6dhyAnzaobmeG8=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
# https://github.com/pydantic/pydantic/pull/8678
|
||||
name = "fix-pytest8-compatibility.patch";
|
||||
url = "https://github.com/pydantic/pydantic/commit/825a6920e177a3b65836c13c7f37d82b810ce482.patch";
|
||||
hash = "sha256-Dap5DtDzHw0jS/QUo5CRI9sLDJ719GRyC4ZNDWEdzus=";
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = lib.optionals (pythonOlder "3.9") [
|
||||
libxcrypt
|
||||
];
|
||||
@@ -76,6 +86,17 @@ buildPythonPackage rec {
|
||||
--replace "'--benchmark-disable'," ""
|
||||
'';
|
||||
|
||||
pytestFlagsArray = [
|
||||
# suppress warnings with pytest>=8
|
||||
"-Wignore::pydantic.warnings.PydanticDeprecatedSince20"
|
||||
"-Wignore::pydantic.json_schema.PydanticJsonSchemaWarning"
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# disable failing test with pytest>=8
|
||||
"test_assert_raises_validation_error"
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
"tests/benchmarks"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user