nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hatchling,
6 pytest,
7 pytest-fixture-classes,
8 pytestCheckHook,
9}:
10
11buildPythonPackage rec {
12 pname = "pytest-lazy-fixtures";
13 version = "1.4.0";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "dev-petrov";
18 repo = "pytest-lazy-fixtures";
19 tag = version;
20 hash = "sha256-mKRWuRz8DDjdtG4Fx5Wcy5PIg2ao3+n9RFbiha7+f5I=";
21 };
22
23 postPatch = ''
24 # Prevent double registration here and in the pyproject.toml entrypoint
25 # ValueError: Plugin already registered under a different name:
26 substituteInPlace tests/conftest.py \
27 --replace-fail '"pytest_lazy_fixtures.plugin",' ""
28 '';
29
30 build-system = [ hatchling ];
31
32 dependencies = [ pytest ];
33
34 nativeCheckInputs = [
35 pytest-fixture-classes
36 pytestCheckHook
37 ];
38
39 disabledTestPaths = [
40 # missing pytest-deadfixtures
41 "tests/test_deadfixtures_support.py"
42 ];
43
44 pythonImportsCheck = [ "pytest_lazy_fixtures" ];
45
46 meta = {
47 description = "Allows you to use fixtures in @pytest.mark.parametrize";
48 homepage = "https://github.com/dev-petrov/pytest-lazy-fixtures";
49 license = lib.licenses.mit;
50 maintainers = [ ];
51 };
52}