1{
2 lib,
3 black,
4 buildPythonPackage,
5 fetchFromGitHub,
6 hatchling,
7 pytest,
8 pytestCheckHook,
9 pythonOlder,
10 ruff,
11}:
12
13buildPythonPackage rec {
14 pname = "pytest-examples";
15 version = "0.0.15";
16 pyproject = true;
17
18 disabled = pythonOlder "3.8";
19
20 src = fetchFromGitHub {
21 owner = "pydantic";
22 repo = "pytest-examples";
23 tag = "v${version}";
24 hash = "sha256-FLcvPa3vBldNINFM5hOraczrZCjSmlrEqkBj+f/sU1k=";
25 };
26
27 build-system = [
28 hatchling
29 ];
30
31 buildInputs = [ pytest ];
32
33 dependencies = [
34 black
35 ruff
36 ];
37
38 nativeCheckInputs = [ pytestCheckHook ];
39
40 pythonImportsCheck = [ "pytest_examples" ];
41
42 meta = {
43 description = "Pytest plugin for testing examples in docstrings and markdown files";
44 homepage = "https://github.com/pydantic/pytest-examples";
45 changelog = "https://github.com/pydantic/pytest-examples/releases/tag/v${version}";
46 license = lib.licenses.mit;
47 maintainers = with lib.maintainers; [ fab ];
48 };
49}