From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id cBIgIXrbXF8KTwAA0tVLHw (envelope-from ) for ; Sat, 12 Sep 2020 14:30:18 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id EMWRG3rbXF9bEgAAbx9fmQ (envelope-from ) for ; Sat, 12 Sep 2020 14:30:18 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3351F940221 for ; Sat, 12 Sep 2020 14:30:18 +0000 (UTC) Received: from localhost ([::1]:46662 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kH6Xh-0002sw-2O for larch@yhetil.org; Sat, 12 Sep 2020 10:30:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kH6XU-0002pZ-HT for guix-patches@gnu.org; Sat, 12 Sep 2020 10:30:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37078) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kH6XU-00054k-5T for guix-patches@gnu.org; Sat, 12 Sep 2020 10:30:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kH6XU-0003tG-1E for guix-patches@gnu.org; Sat, 12 Sep 2020 10:30:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43354] [PATCH 04/55] gnu: python-pytest-django: Update to 3.9.0. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 12 Sep 2020 14:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43354 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43354@debbugs.gnu.org Received: via spool by 43354-submit@debbugs.gnu.org id=B43354.159992097214723 (code B ref 43354); Sat, 12 Sep 2020 14:30:03 +0000 Received: (at 43354) by debbugs.gnu.org; 12 Sep 2020 14:29:32 +0000 Received: from localhost ([127.0.0.1]:48589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kH6Wx-0003pK-Ph for submit@debbugs.gnu.org; Sat, 12 Sep 2020 10:29:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kH6Wv-0003on-Vc for 43354@debbugs.gnu.org; Sat, 12 Sep 2020 10:29:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36244) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kH6Wq-00050n-OJ for 43354@debbugs.gnu.org; Sat, 12 Sep 2020 10:29:24 -0400 Received: from ti0006q161-3115.bb.online.no ([88.95.106.80]:51784 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kH6Wp-0001qK-FP for 43354@debbugs.gnu.org; Sat, 12 Sep 2020 10:29:24 -0400 From: Marius Bakke Date: Sat, 12 Sep 2020 16:28:20 +0200 Message-Id: <20200912142911.6231-4-marius@gnu.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200912142911.6231-1-marius@gnu.org> References: <20200912142911.6231-1-marius@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 3.99 X-TUID: KQp26Uf68TB9 * gnu/packages/django.scm (python-pytest-django): Update to 3.9.0. [arguments]: Remove #:tests?. Add phase to run custom tests. [native-inputs]: Add PYTHON-PYTEST-XDIST and PYTHON-SQLPARSE. --- gnu/packages/django.scm | 41 ++++++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm index b3abb17277..30716dd286 100644 --- a/gnu/packages/django.scm +++ b/gnu/packages/django.scm @@ -309,26 +309,49 @@ size and quality.") (define-public python-pytest-django (package (name "python-pytest-django") - (version "3.1.2") + (version "3.9.0") (source (origin (method url-fetch) (uri (pypi-uri "pytest-django" version)) (sha256 (base32 - "02932m2sr8x22m4az8syr8g835g4ak77varrnw71n6xakmdcr303")))) + "1yds71ppg39whs7pvlbwxfglm0jxyawh33rq34jihpif4i15ykk6")))) (build-system python-build-system) (arguments - `(#:tests? #f ; FIXME: How to run tests? - #:phases + `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'patch-setuppy - (lambda _ - (substitute* "setup.py" - (("setuptools_scm==1.11.1") "setuptools_scm")) + (replace 'check + (lambda* (#:key tests? inputs outputs #:allow-other-keys) + (if tests? + (begin + ;; Adjust for Django 3.1, can be removed for versions >= 3.10.0. + (substitute* "tests/test_fixtures.py" + (("from django\\.conf\\.urls import url") + "from django.urls import path") + (("url\\(r'admin") + "path('admin")) + (add-installed-pythonpath inputs outputs) + (setenv "PYTHONPATH" + (string-append ".:" ;for pytest_django_test + (getenv "PYTHONPATH"))) + (setenv "PYTEST_DJANGO_TEST_RUNNER" "pytest") + (setenv "DJANGO_SETTINGS_MODULE" + "pytest_django_test.settings_sqlite_file") + (invoke "pytest" "-vv" "-k" + ;; FIXME: the settings modules fails to locate templates. + (string-append "not test_django_not_loaded_without_settings" + " and not test_settings" + ;; XXX: Incompatible with Django 3.1? + " and not test_urls_cache_is_cleared"))) + (format #t "test suite not run~%")) #t))))) (native-inputs `(("python-django" ,python-django) - ("python-setuptools-scm" ,python-setuptools-scm))) + ("python-setuptools-scm" ,python-setuptools-scm) + + ;; For tests. + ("python-pytest-xdist" ,python-pytest-xdist) + ("python-sqlparse" ,python-sqlparse))) ;XXX: really a Django dependency (propagated-inputs `(("python-pytest" ,python-pytest))) (home-page "https://pytest-django.readthedocs.org/") -- 2.28.0