From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id cJjtCVncXF9sXAAA0tVLHw (envelope-from ) for ; Sat, 12 Sep 2020 14:34:01 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id oApRBFncXF9qJwAA1q6Kng (envelope-from ) for ; Sat, 12 Sep 2020 14:34:01 +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 CADA1940291 for ; Sat, 12 Sep 2020 14:34:00 +0000 (UTC) Received: from localhost ([::1]:60568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kH6bH-0000eU-OH for larch@yhetil.org; Sat, 12 Sep 2020 10:33:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35424) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kH6aQ-0007OZ-JF for guix-patches@gnu.org; Sat, 12 Sep 2020 10:33:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37205) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kH6aQ-0005rV-4l for guix-patches@gnu.org; Sat, 12 Sep 2020 10:33:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kH6aP-00048m-1S for guix-patches@gnu.org; Sat, 12 Sep 2020 10:33:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43354] [PATCH 41/55] gnu: Add python-sqlalchemy-mock. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 12 Sep 2020 14:33:04 +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.159992117115800 (code B ref 43354); Sat, 12 Sep 2020 14:33:04 +0000 Received: (at 43354) by debbugs.gnu.org; 12 Sep 2020 14:32:51 +0000 Received: from localhost ([127.0.0.1]:48732 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kH6aB-00046m-5l for submit@debbugs.gnu.org; Sat, 12 Sep 2020 10:32:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59618) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kH6a9-00046N-Sv for 43354@debbugs.gnu.org; Sat, 12 Sep 2020 10:32:50 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36420) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kH6a3-0005oO-TZ for 43354@debbugs.gnu.org; Sat, 12 Sep 2020 10:32:44 -0400 Received: from ti0006q161-3115.bb.online.no ([88.95.106.80]:53476 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kH6a2-0007hz-5i for 43354@debbugs.gnu.org; Sat, 12 Sep 2020 10:32:42 -0400 From: Marius Bakke Date: Sat, 12 Sep 2020 16:28:57 +0200 Message-Id: <20200912142911.6231-41-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: RLaWYGYTO07o * gnu/packages/databases.scm (python-alchemy-mock): New public variable. --- gnu/packages/databases.scm | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 401c88a086..0adb42bbe4 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -2712,6 +2712,47 @@ You might also want to install the following optional dependencies: (define-public python2-sqlalchemy-utils (package-with-python2 python-sqlalchemy-utils)) +(define-public python-alchemy-mock + (package + (name "python-alchemy-mock") + (version "0.4.3") + (home-page "https://github.com/miki725/alchemy-mock") + (source (origin + (method url-fetch) + (uri (pypi-uri "alchemy-mock" version)) + (sha256 + (base32 + "0ylxygl3bcdapzz529n8wgk7vx9gjwb3ism564ypkpd7dbsw653r")))) + (build-system python-build-system) + (arguments + '(#:phases (modify-phases %standard-phases + (replace 'check + (lambda _ + ;; Create pytest.ini that adds doctest options to + ;; prevent test failure. Taken from tox.ini. + (call-with-output-file "pytest.ini" + (lambda (port) + (format port "[pytest] +doctest_optionflags=IGNORE_EXCEPTION_DETAIL +"))) + (invoke "pytest" "-vv" "--doctest-modules" + "alchemy_mock/")))))) + (native-inputs + `(("python-mock" ,python-mock) + ("python-pytest" ,python-pytest))) + (propagated-inputs + `(("python-six" ,python-six) + ("python-sqlalchemy" ,python-sqlalchemy))) + (synopsis "Mock helpers for SQLAlchemy") + (description + "This package provides mock helpers for SQLAlchemy that makes it easy +to mock an SQLAlchemy session while preserving the ability to do asserts. + +Normally Normally SQLAlchemy's expressions cannot be easily compared as +comparison on binary expression produces yet another binary expression, but +this library provides functions to facilitate such comparisons.") + (license license:expat))) + (define-public python-alembic (package (name "python-alembic") -- 2.28.0