From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id C83DF6DE2331 for ; Sun, 25 Mar 2018 11:22:11 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[AWL=0.011, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qfbti4Ty26Ks for ; Sun, 25 Mar 2018 11:22:06 -0700 (PDT) X-Greylist: delayed 2457 seconds by postgrey-1.36 at arlo; Sun, 25 Mar 2018 11:22:03 PDT Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 469076DE1A9D for ; Sun, 25 Mar 2018 11:22:03 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1f09dR-00056x-DN; Sun, 25 Mar 2018 13:40:49 -0400 Received: (nullmailer pid 18099 invoked by uid 1000); Sun, 25 Mar 2018 17:40:48 -0000 From: David Bremner To: Justus Winter , Floris Bruynooghe , David Bremner , "W. Trevor King" Cc: notmuch@notmuchmail.org Subject: [PATCH 2/3] test: add new test_expect_pytest_success Date: Sun, 25 Mar 2018 14:40:33 -0300 Message-Id: <20180325174034.17912-3-david@tethera.net> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180325174034.17912-1-david@tethera.net> References: <87po3x4tuc.fsf@thinkbox.jade-hamburg.de> <20180325174034.17912-1-david@tethera.net> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Mar 2018 18:22:11 -0000 As the name suggests, this is something of a cross between test_python (reading a script from stdin) and test expect success. It seemed somewhat redundant to allow our usual kind of file comparison with pytest scripts, although that will make it tougher to compare output with the CLI. --- test/test-lib.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/test-lib.sh b/test/test-lib.sh index 5b212514..fd0e9647 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -1002,6 +1002,13 @@ test_python() { $NOTMUCH_PYTHON -B - > OUTPUT } +test_expect_pytest_success() { + test_file="test_${test_count}.py" + cat > ${test_file} + PYTHONPATH="$NOTMUCH_SRCDIR/bindings/python${PYTHONPATH:+:$PYTHONPATH}" \ + test_expect_success "$NOTMUCH_PYTEST ${test_file}" +} + test_ruby() { MAIL_DIR=$MAIL_DIR ruby -I $NOTMUCH_SRCDIR/bindings/ruby> OUTPUT } -- 2.16.2