mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 19:34:06 +00:00
python312Packages.scales: run tests using pytestCheckHook
This commit is contained in:
parent
03071e099e
commit
5b69bffd3a
@ -2,7 +2,8 @@
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
nose,
|
||||
pytestCheckHook,
|
||||
fetchpatch2,
|
||||
six,
|
||||
}:
|
||||
|
||||
@ -16,11 +17,24 @@ buildPythonPackage rec {
|
||||
sha256 = "8b6930f7d4bf115192290b44c757af5e254e3fcfcb75ff9a51f5c96a404e2753";
|
||||
};
|
||||
|
||||
nativeCheckInputs = [ nose ];
|
||||
propagatedBuildInputs = [ six ];
|
||||
patches = [
|
||||
# Use html module in Python 3 and cgi module in Python 2
|
||||
# https://github.com/Cue/scales/pull/47
|
||||
(fetchpatch2 {
|
||||
url = "https://github.com/Cue/scales/commit/ee69d45f1a7f928f7b241702e9be06007444115e.patch?full_index=1";
|
||||
hash = "sha256-xBlgkh1mf+3J7GtNI0zGb7Sum8UYbTpUmM12sxK/fSU=";
|
||||
})
|
||||
];
|
||||
|
||||
# No tests included
|
||||
doCheck = false;
|
||||
postPatch = ''
|
||||
for file in scales_test formats_test aggregation_test; do
|
||||
substituteInPlace src/greplin/scales/$file.py \
|
||||
--replace-fail "assertEquals" "assertEqual"
|
||||
done;
|
||||
'';
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
propagatedBuildInputs = [ six ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Stats for Python processes";
|
||||
|
Loading…
Reference in New Issue
Block a user