guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

139/166: gnu: python-sqlalchemy: Run tests in parallel via xdist.


From: guix-commits
Subject: 139/166: gnu: python-sqlalchemy: Run tests in parallel via xdist.
Date: Tue, 19 Apr 2022 09:18:10 -0400 (EDT)

apteryx pushed a commit to branch wip-ipython+polyglossia
in repository guix.

commit 0c3f12a625917e92ad30ebb96f65b4ec85db8d2e
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Mon Apr 18 01:23:56 2022 -0400

    gnu: python-sqlalchemy: Run tests in parallel via xdist.
    
    * gnu/packages/databases.scm (python-sqlalchemy)[phases]{check}: Run tests 
in
    parallel; skip slow test_memusage.
---
 gnu/packages/databases.scm | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 4472677ab3..5746d25c0e 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -32,7 +32,7 @@
 ;;; Copyright © 2017 Kristofer Buffington <kristoferbuffington@gmail.com>
 ;;; Copyright © 2018 Amirouche Boubekki <amirouche@hypermove.net>
 ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
-;;; Copyright © 2018, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2018, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2019 Gábor Boskovits <boskovits@gmail.com>
@@ -3364,7 +3364,7 @@ Database API 2.0T.")
     (build-system python-build-system)
     (native-inputs
      (list python-cython ; for C extensions
-           python-pytest python-mock)) ; for tests
+           python-pytest python-mock python-pytest-xdist)) ; for tests
     (propagated-inputs
      (list python-greenlet))
     (arguments
@@ -3373,7 +3373,11 @@ Database API 2.0T.")
          (replace 'check
            (lambda* (#:key tests? #:allow-other-keys)
              (when tests?
-               (invoke "py.test")))))))
+               (invoke "pytest" "-vv"
+                       "-n" (number->string (parallel-job-count))
+                       ;; The memory usage tests are very expensive and run in
+                       ;; sequence; skip them.
+                       "-k" "not test_memusage.py")))))))
     (home-page "https://www.sqlalchemy.org";)
     (synopsis "Database abstraction library")
     (description



reply via email to

[Prev in Thread] Current Thread [Next in Thread]