diff --git a/flake.lock b/flake.lock index 4c928a4..68074f7 100644 --- a/flake.lock +++ b/flake.lock @@ -19,11 +19,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1742288794, - "narHash": "sha256-Txwa5uO+qpQXrNG4eumPSD+hHzzYi/CdaM80M9XRLCo=", + "lastModified": 1749285348, + "narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b6eaf97c6960d97350c584de1b6dcff03c9daf42", + "rev": "3e3afe5174c561dee0df6f2c2b2236990146329f", "type": "github" }, "original": { diff --git a/nix/dibbler.nix b/nix/dibbler.nix index 24dc21d..610b2dd 100644 --- a/nix/dibbler.nix +++ b/nix/dibbler.nix @@ -13,6 +13,14 @@ python3Packages.buildPythonApplication { # https://github.com/NixOS/nixpkgs/issues/285234 dontCheckRuntimeDeps = true; + pythonImportsCheck = []; + + doCheck = true; + nativeCheckInputs = with python3Packages; [ + pytest + pytestCheckHook + ]; + nativeBuildInputs = with python3Packages; [ setuptools ]; propagatedBuildInputs = with python3Packages; [ brother-ql diff --git a/nix/shell.nix b/nix/shell.nix index 7c93f0f..31e8338 100644 --- a/nix/shell.nix +++ b/nix/shell.nix @@ -15,6 +15,9 @@ mkShell { psycopg2 python-barcode sqlalchemy + + pytest + pytest-cov ])) ]; } diff --git a/pyproject.toml b/pyproject.toml index 3179a6f..af23cbc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,12 @@ dependencies = [ ] dynamic = ["version"] +[project.optional-dependencies] +dev = [ + "pytest", + "pytest-cov", +] + [tool.setuptools.packages.find] include = ["dibbler*"]