python311Packages.pympler: fix tests
This commit is contained in:
parent
95483d41fa
commit
f07f108c7c
|
@ -1,7 +1,10 @@
|
||||||
{ lib, stdenv
|
{ lib, stdenv
|
||||||
|
, bottle
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
|
, fetchpatch
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
|
, pythonAtLeast
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
|
@ -13,14 +16,36 @@ buildPythonPackage rec {
|
||||||
sha256 = "993f1a3599ca3f4fcd7160c7545ad06310c9e12f70174ae7ae8d4e25f6c5d3fa";
|
sha256 = "993f1a3599ca3f4fcd7160c7545ad06310c9e12f70174ae7ae8d4e25f6c5d3fa";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Fixes a TypeError on Python 3.11
|
||||||
|
# (see https://github.com/pympler/pympler/issues/148)
|
||||||
|
(fetchpatch {
|
||||||
|
name = "${pname}-python-3.11-compat.patch";
|
||||||
|
url = "https://github.com/pympler/pympler/pull/149.patch";
|
||||||
|
hash = "sha256-6MK0AuhVhQkUzlk29HUh1+mSbfsVTBJ1YBtYNIFhh7U=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# There is a version of bottle bundled with Pympler, but it is broken on
|
||||||
|
# Python 3.11. Fortunately, Pympler will preferentially import an external
|
||||||
|
# bottle if it is available, so we make it an explicit dependency.
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
bottle
|
||||||
|
];
|
||||||
|
|
||||||
disabledTests = [
|
disabledTests = [
|
||||||
# 'AssertionError: 'function (test.muppy.test_summary.func)' != 'function (muppy.test_summary.func)'
|
# 'AssertionError: 'function (test.muppy.test_summary.func)' != 'function (muppy.test_summary.func)'
|
||||||
# https://github.com/pympler/pympler/issues/134
|
# https://github.com/pympler/pympler/issues/134
|
||||||
"test_repr_function"
|
"test_repr_function"
|
||||||
|
] ++ lib.optionals (pythonAtLeast "3.11") [
|
||||||
|
# https://github.com/pympler/pympler/issues/148
|
||||||
|
"test_findgarbage"
|
||||||
|
"test_get_tree"
|
||||||
|
"test_prune"
|
||||||
];
|
];
|
||||||
|
|
||||||
doCheck = stdenv.hostPlatform.isLinux;
|
doCheck = stdenv.hostPlatform.isLinux;
|
||||||
|
|
Loading…
Reference in a new issue