From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id KEoUBnZvqmVQagAAqHPOHw:P1 (envelope-from ) for ; Fri, 19 Jan 2024 13:47:50 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id KEoUBnZvqmVQagAAqHPOHw (envelope-from ) for ; Fri, 19 Jan 2024 13:47:50 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="jSO9wZ8/"; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1705668470; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=9O1+jSQOdL2AjZnGzBdnMED4DM5FIdAlucciA/Hl+gQ=; b=tmDu/VFiHfXfIO4qSh22M5ubs1eZLcoGG/qfeByYweQO7UUmt1+jJetNeXLne+Wd/eY9A+ RsWWhlnAF4FRNHPdIBOD0oQ1em11Gq2UI5VBFP+mIHXngyxm1PVHAUifnFapQO6y/xIBBP 0XjLks06Or+vwG2nfCfMeDPXAyXYCG+GM0hZlp6NSSllf6mxL+klAzQbX/M8hMugm0PFRd 3DcSLeObgdg3ryvH//mX4t8Lrk/u9xktEufMUWJPvsHbU4AYLv48Ilh8AKxD6eUojG3a9s /dISbHjV0lW2m7dfRSFpWO9Q+XWXrAeB+Dc9JRiMkvGDqfsM8fJE7DXZbP3XQQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="jSO9wZ8/"; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1705668470; a=rsa-sha256; cv=none; b=uEGKLlz4+v+pKXmEojJtHPTm/JxBlfyZztaZWcwp0878DF2hSBC71ZpGlVuF4SY9dLg5oT zf/ea5LZoY5MyYp/bNg3Fv3A48+jLD5pGZx9TEbyzHkHYxRfflv90/GZ/4U8e/YUBcVIq5 Yq5BZSVZ8rokSzeZHySvFyzdkp2g3dqXxObBVoCADc6oHYYzImYO31GsY3TCqZQ6h4OE4r KZdefyTeo7W9c1w5pHcC3uCMHNHKFaODi6yx81bAfR9lFTThjknXfEXqwiRKg02SCtoR8e 55DF8Tbb19uN3JvZ3ed8ObDSTWtRh6qGsj0RybUtf8jAEvTD0siSoWn315da+w== 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 B2BC767E14 for ; Fri, 19 Jan 2024 13:47:49 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQoHC-0001U6-FT; Fri, 19 Jan 2024 07:47:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rQoHA-0001T8-Gq for emacs-orgmode@gnu.org; Fri, 19 Jan 2024 07:47:12 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rQoH6-0007Z6-Rr for emacs-orgmode@gnu.org; Fri, 19 Jan 2024 07:47:12 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 87C46240028 for ; Fri, 19 Jan 2024 13:47:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1705668424; bh=vm7sp6PEpCEJGNklEpFSw4Lb9Hy47sW167hMFHxAeRQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=jSO9wZ8/GQRRK9ZHI3wgoLjx+GpUMbXRckoK5cPynhiGNr867Ft8SjL5paga6WJyT 4QSbdGK6ILvMIfe6b4cGTy59P6QHTBkgIW+6uL2MC0gnG/6OYR8pDoYpli0f7hoHYC qMdt0zF40LM2IfuIAT9bC+45/TdExhPKxYBh6C4LhRKb0EiCNC8jktyruRIXprm3E5 fpD085SjC8/XEB/8HDBtmtx10YnRzRH9UcBUuyf7gxbWZimLelgsynxdiDP27PuObh n95tAVLs0ELlGoooMkxr7KjpekOkrxVePlqhVHMuUUXEMIFflj+zXt3oV1lA+dtdeV J5s7MiE+0UsOw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TGfWq5WR7z6trs; Fri, 19 Jan 2024 13:47:03 +0100 (CET) From: Ihor Radchenko To: gerard.vermeulen@posteo.net Cc: Emacs orgmode Subject: Re: [PATCH] Patches for problems discovered with interactive testing In-Reply-To: <7815c5360c35a1794db076a646518035@posteo.net> References: <7815c5360c35a1794db076a646518035@posteo.net> Date: Fri, 19 Jan 2024 12:50:19 +0000 Message-ID: <874jf9pjw4.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.90 X-Spam-Score: -9.90 X-Migadu-Queue-Id: B2BC767E14 X-Migadu-Scanner: mx12.migadu.com X-TUID: 8FBP9vHkY0mg gerard.vermeulen@posteo.net writes: > This patch addresses a number of glitches discovered during interactive > testing and contains possible fixes (sub-patch test-ob-maxima fixes > batch testing on my system, but not interactive testing). Thanks for your interest in improving Org mode tests! > The test-ob-maxima patch may be due to a different Maxima version, but > I do not think so. In batch testing test-ob-maxima passes contrary to > interactive mode. On my side, Maxima tests pass both interactively and non-interactively. I use Maxima 5.47.0 What is your version? > The test-ob-python patch unsets org-src-preserve-indentation which I > have set. > > The test-ob patch also unsets org-src-preserve-indentation. > The test-org patch also unsets org-src-preserve-indentation. This > reduces the number of failures to 2 while testing test-org > interactively. It is generally not expected that Org tests will pass when you try to run them on Emacs instance with your personal config. This is because you can have arbitrary customizations, hooks, or advices that change the Org mode defaults. let-binding a couple of variables cannot fix this general problem for all scenarios. So, I do not see any reason to accept patches that make the tests run with personal config of a single user. What might be useful, however, is making sure that tests do not fail interactively with a clean Emacs config (make repro). Check out testing/README file. > (ert-deftest ob-maxima/string-input () > "Test of string input" > (org-test-at-id "b5842ed4-8e8b-4b18-a1c9-cef006b6a6c8" > (org-babel-next-src-block 2) > - (should (equal "- sin(x)" (org-babel-execute-src-block))))) > + (should (equal '(("(linenum:0," "") ("-" "sin(x)")) > + (org-babel-execute-src-block))))) The test in question is testing the output of #+begin_src maxima :var fun="sin(x)" :var q=2 :results silent print(diff(fun, x, q))$ #+end_src It is certainly not expected that such code block returns "linenum:0". Tests in Org mode are verifying that Org mode behaves correctly. It makes no sense to change the test when Org mode result is not correct - we should instead fix Org mode. In the majority of cases, if the test is failing, it is not something wrong with the test, but something wrong with Org mode code that test is verifying. > (ert-deftest test-ob/does-not-replace-a-block-with-the-results () > (org-test-with-temp-text "#+NAME: foo > diff --git a/testing/lisp/test-org-element.el b/testing/lisp/test-org-element.el > index ca7d77e28..f0958ff59 100644 > --- a/testing/lisp/test-org-element.el > +++ b/testing/lisp/test-org-element.el > @@ -4457,7 +4457,7 @@ Text > '(paragraph nil " Two spaces\n\n \n Two spaces")) > '(paragraph nil "Two spaces\n\n\nTwo spaces"))) > (should > - (equal > + (equal ;; Fails in test. Why? (equal ...) form works in ielm. It would help if you provided the error ERT displayed when the test failed. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at