Files
nixpkgs/pkgs/development/python-modules/inline-snapshot/default.nix
T
Martin Weinelt e11f6b4260 python3Packages.pytest-subtests: drop
The plugin's functionaltiy is now part of pytest 9 and the the plugin
itself has been archived.
2026-02-01 16:40:29 +01:00

81 lines
1.5 KiB
Nix

{
lib,
asttokens,
black,
buildPythonPackage,
dirty-equals,
executing,
fetchFromGitHub,
freezegun,
hatchling,
hypothesis,
pydantic,
pyright,
pytest-freezer,
pytest-mock,
pytest-xdist,
pytestCheckHook,
pythonOlder,
rich,
time-machine,
toml,
}:
buildPythonPackage rec {
pname = "inline-snapshot";
version = "0.28.0";
pyproject = true;
src = fetchFromGitHub {
owner = "15r10nk";
repo = "inline-snapshot";
tag = version;
hash = "sha256-f572H7jeolv9nONuRBtZR/pcVDs5oX/dOiEjXlJyiio=";
};
build-system = [ hatchling ];
dependencies = [
asttokens
executing
rich
toml
]
++ lib.optionals (pythonOlder "3.11") [
toml
];
nativeCheckInputs = [
freezegun
hypothesis
pydantic
pyright
pytest-freezer
pytest-mock
pytest-xdist
pytestCheckHook
time-machine
]
++ lib.concatAttrValues optional-dependencies;
optional-dependencies = {
black = [ black ];
dirty-equals = [ dirty-equals ];
};
pythonImportsCheck = [ "inline_snapshot" ];
disabledTestPaths = [
# Tests don't play nice with pytest-xdist
"tests/test_typing.py"
];
meta = {
description = "Create and update inline snapshots in Python tests";
homepage = "https://github.com/15r10nk/inline-snapshot/";
changelog = "https://github.com/15r10nk/inline-snapshot/blob/${src.tag}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}