From 8b87123599e1d1b02fdfa0925f4cf569d5962297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 14 Sep 2025 08:33:24 -0700 Subject: [PATCH] python3Packages.reptor: skip all integration tests Currently four tests fail with RuntimeError: APIClient cannot be used in tests. Patch methods as needed. --- .../python-modules/reptor/default.nix | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/reptor/default.nix b/pkgs/development/python-modules/reptor/default.nix index 4611e85cf013..e972155efcf3 100644 --- a/pkgs/development/python-modules/reptor/default.nix +++ b/pkgs/development/python-modules/reptor/default.nix @@ -6,6 +6,7 @@ deepl, django, fetchFromGitHub, + fetchpatch, gql, pytestCheckHook, pyyaml, @@ -34,6 +35,14 @@ buildPythonPackage rec { hash = "sha256-nNG4rQHloOqcPZPnvw3hbw0+wCbB2XAdQ5/XnJtCHnE="; }; + patches = [ + # https://github.com/Syslifters/reptor/pull/221 + (fetchpatch { + url = "https://github.com/Syslifters/reptor/commit/0fc43c246e2f99aaac9e78af818f360a3a951980.patch"; + hash = "sha256-eakbI7hMJdshD0OA6n7dEO4+qPB21sYl09uZgepiWu0="; + }) + ]; + pythonRelaxDeps = true; build-system = [ setuptools ]; @@ -69,15 +78,9 @@ buildPythonPackage rec { pythonImportsCheck = [ "reptor" ]; - disabledTestPaths = [ - # Tests want to use pip install dependencies - "reptor/plugins/importers/GhostWriter/tests/test_ghostwriter.py" - ]; - - disabledTests = [ + disabledTestMarks = [ # Tests need network access - "TestDummy" - "TestIntegration" + "integration" ]; meta = with lib; {