mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
python3Packages.pytest-memray: init at 1.8.0 ; python314Packages.pyturbojpeg: enable tests (#534001)
This commit is contained in:
commit
0559b83f73
3 changed files with 68 additions and 8 deletions
56
pkgs/development/python-modules/pytest-memray/default.nix
Normal file
56
pkgs/development/python-modules/pytest-memray/default.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
lib,
|
||||
anyio,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
flaky,
|
||||
hatchling,
|
||||
hatch-vcs,
|
||||
memray,
|
||||
pytest,
|
||||
pytest-xdist,
|
||||
pytestCheckHook,
|
||||
}:
|
||||
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "pytest-memray";
|
||||
version = "1.8.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bloomberg";
|
||||
repo = "pytest-memray";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-73Lyy14t2Hcqo0aTlWbGMzaxJ73bKjzc4BFE/jPG99I=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
hatchling
|
||||
hatch-vcs
|
||||
];
|
||||
|
||||
dependencies = [ memray ];
|
||||
|
||||
buildInputs = [ pytest ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
anyio
|
||||
flaky
|
||||
pytest-xdist
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
enabledTestPaths = [
|
||||
# don't run the demo tests
|
||||
"tests"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "pytest_memray" ];
|
||||
|
||||
meta = {
|
||||
description = "Pytest plugin for easy integration of memray memory profiler";
|
||||
homepage = "https://github.com/bloomberg/pytest-memray";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ SuperSandro2000 ];
|
||||
};
|
||||
})
|
||||
|
|
@ -6,7 +6,8 @@
|
|||
libjpeg_turbo,
|
||||
setuptools,
|
||||
numpy,
|
||||
python,
|
||||
pytest-memray,
|
||||
pytestCheckHook,
|
||||
replaceVars,
|
||||
}:
|
||||
|
||||
|
|
@ -32,14 +33,15 @@ buildPythonPackage rec {
|
|||
|
||||
dependencies = [ numpy ];
|
||||
|
||||
# upstream has no tests, but we want to test whether the library is found
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
nativeCheckInputs = [
|
||||
pytest-memray
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
${python.interpreter} -c 'from turbojpeg import TurboJPEG; TurboJPEG()'
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
disabledTests = [
|
||||
# our patch breaks the test
|
||||
"test_library_loading_error_message"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "turbojpeg" ];
|
||||
|
||||
|
|
|
|||
|
|
@ -15859,6 +15859,8 @@ self: super: with self; {
|
|||
|
||||
pytest-md-report = callPackage ../development/python-modules/pytest-md-report { };
|
||||
|
||||
pytest-memray = callPackage ../development/python-modules/pytest-memray { };
|
||||
|
||||
pytest-metadata = callPackage ../development/python-modules/pytest-metadata { };
|
||||
|
||||
pytest-mock = callPackage ../development/python-modules/pytest-mock { };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue