summaryrefslogtreecommitdiff
path: root/gnu/packages/django.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/django.scm')
-rw-r--r--gnu/packages/django.scm27
1 files changed, 15 insertions, 12 deletions
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index 4060819a35..4404c8368d 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -64,9 +64,16 @@
(sha256
(base32
"1ha6c5j3pizbsfzw37r52lvdz8z5lblq4iwa99mpkdzz92aiqp2y"))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
- '(#:phases
+ '(#:test-flags
+ (list
+ ;; By default tests run in parallel, which may cause various race
+ ;; conditions. Run sequentially for consistent results.
+ "--parallel=1"
+ ;; The test suite fails as soon as a single test fails.
+ "--failfast")
+ #:phases
(modify-phases %standard-phases
(add-before 'check 'pre-check
(lambda* (#:key inputs #:allow-other-keys)
@@ -82,19 +89,15 @@
;; harmless, so just ignore this test.
(substitute* "tests/settings_tests/tests.py"
((".*def test_incorrect_timezone.*" all)
- (string-append " @unittest.skipIf(True, 'Disabled by Guix')\n"
+ (string-append " @unittest.skip('Disabled by Guix')\n"
all)))))
(replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
+ (lambda* (#:key tests? test-flags #:allow-other-keys)
(if tests?
(with-directory-excursion "tests"
;; Tests expect PYTHONPATH to contain the root directory.
(setenv "PYTHONPATH" "..")
- (invoke "python" "runtests.py"
- ;; By default tests run in parallel, which may cause
- ;; various race conditions. Run sequentially for
- ;; consistent results.
- "--parallel=1"))
+ (apply invoke "python" "runtests.py" test-flags))
(format #t "test suite not run~%"))))
;; XXX: The 'wrap' phase adds native inputs as runtime dependencies,
;; see <https://bugs.gnu.org/25235>. The django-admin script typically
@@ -108,12 +111,12 @@
;; Remaining packages are test requirements taken from
;; tests/requirements/py3.txt
python-docutils
- ;; optional for tests: ("python-geoip2" ,python-geoip2)
- ;; optional for tests: ("python-memcached" ,python-memcached)
+ ;; optional for tests: python-geoip2
+ ;; optional for tests: python-memcached
python-numpy
python-pillow
python-pyyaml
- ;; optional for tests: ("python-selenium" ,python-selenium)
+ ;; optional for tests: python-selenium
python-tblib))
(propagated-inputs
(list python-asgiref