From: Ihor Radchenko <yantar92@posteo.net>
To: Alexander Adolf <alexander.adolf@condition-alpha.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: columnview dynamic block - different time summing behaviour for EFFORT and CLOCKSUM
Date: Thu, 02 May 2024 12:09:37 +0000 [thread overview]
Message-ID: <8734r0beke.fsf@localhost> (raw)
In-Reply-To: <91dfeb0fed1a1fe0564e5eb9b95a409d@condition-alpha.com>
[-- Attachment #1: Type: text/plain, Size: 686 bytes --]
Alexander Adolf <alexander.adolf@condition-alpha.com> writes:
> 4 unexpected results:
> FAILED ob-calc/matrix-inversion ((should (equal "[[-1, 0.625, -0.125], [0.25, -0.5, 0.25], [0.5, 0.125, -0.125]]" (org-babel-execute-src-block))) :form (equal "[[-1, 0.625, -0.125], [0.25, -0.5, 0.25], [0.5, 0.125, -0.125]]" "[[-1, 625e-3, -125e-3], [250e-3, -500e-3, 250e-3], [500e-3, 125e-3, -125e-3]]") :value nil :explanation (arrays-of-different-length 63 77 "[[-1, 0.625, -0.125], [0.25, -0.5, 0.25], [0.5, 0.125, -0.125]]" "[[-1, 625e-3, -125e-3], [250e-3, -500e-3, 250e-3], [500e-3, 125e-3, -125e-3]]" first-mismatch-at 6))
Will the failure disappear if you try the attached patch?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-ob-calc-matrix-inversion-Force-calc-float-format-in-.patch --]
[-- Type: text/x-patch, Size: 1720 bytes --]
From fb317be318aaf32104e9334d34813681c26ac240 Mon Sep 17 00:00:00 2001
Message-ID: <fb317be318aaf32104e9334d34813681c26ac240.1714651740.git.yantar92@posteo.net>
From: Ihor Radchenko <yantar92@posteo.net>
Date: Thu, 2 May 2024 15:07:12 +0300
Subject: [PATCH] ob-calc/matrix-inversion: Force `calc-float-format' in the
test
* testing/lisp/test-ob-calc.el (ob-calc/matrix-inversion): When
testing, make sure that calc output follows the expected format.
This is needed on MacOS where Emacs defaults are not exactly the same.
Reported-by: Alexander Adolf <alexander.adolf@condition-alpha.com>
Link: https://list.orgmode.org/orgmode/91dfeb0fed1a1fe0564e5eb9b95a409d@condition-alpha.com/
---
testing/lisp/test-ob-calc.el | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/testing/lisp/test-ob-calc.el b/testing/lisp/test-ob-calc.el
index 6d6ca104d..e5f2cee0b 100644
--- a/testing/lisp/test-ob-calc.el
+++ b/testing/lisp/test-ob-calc.el
@@ -59,7 +59,14 @@ (ert-deftest ob-calc/matrix-inversion ()
inv(a)
#+END_SRC "
(should (equal "[[-1, 0.625, -0.125], [0.25, -0.5, 0.25], [0.5, 0.125, -0.125]]"
- (org-babel-execute-src-block)))))
+ (let ((calc-float-format '(float 0)))
+ ;; ;; Make sure that older Calc buffers are not present.
+ (save-current-buffer
+ (when (ignore-errors (calc-select-buffer))
+ (kill-buffer)))
+ ;; Now, let-bound `calc-float-format' will take
+ ;; effect.
+ (org-babel-execute-src-block))))))
(ert-deftest ob-calc/matrix-algebra ()
"Test of simple matrix algebra."
--
2.44.0
[-- Attachment #3: Type: text/plain, Size: 224 bytes --]
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
next prev parent reply other threads:[~2024-05-02 12:09 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-08 21:08 columnview dynamic block - different time summing behaviour for EFFORT and CLOCKSUM Alexander Adolf
2024-04-11 13:44 ` Ihor Radchenko
2024-04-12 12:13 ` Alexander Adolf
2024-04-13 14:19 ` Ihor Radchenko
2024-04-13 16:37 ` Alexander Adolf
2024-04-13 16:55 ` Ihor Radchenko
2024-04-15 16:46 ` Alexander Adolf
2024-04-19 10:49 ` Ihor Radchenko
2024-04-19 15:35 ` Alexander Adolf
2024-04-19 17:09 ` Ihor Radchenko
2024-04-20 14:30 ` Alexander Adolf
2024-04-21 13:42 ` Ihor Radchenko
2024-04-22 20:41 ` Alexander Adolf
2024-04-23 11:28 ` Ihor Radchenko
2024-04-23 16:27 ` Alexander Adolf
2024-04-23 16:35 ` Ihor Radchenko
2024-04-24 17:29 ` Alexander Adolf
2024-04-26 12:21 ` Ihor Radchenko
2024-04-26 12:38 ` Bastien Guerry
2024-04-26 12:47 ` Ihor Radchenko
2024-04-26 16:07 ` Alexander Adolf
2024-04-28 13:13 ` Ihor Radchenko
2024-04-19 17:26 ` Alexander Adolf
2024-04-24 10:51 ` FAILED test-ob-shell/bash-uses-assoc-arrays Max Nikulin
2024-04-24 12:54 ` Ihor Radchenko
2024-04-24 16:04 ` Max Nikulin
2024-04-26 11:08 ` Ihor Radchenko
2024-04-26 16:41 ` Max Nikulin
2024-04-28 13:11 ` Ihor Radchenko
2024-05-02 10:20 ` [PATCH] test-ob-shell.el: Skip based on feature detection Max Nikulin
2024-05-02 12:57 ` Ihor Radchenko
2024-05-02 12:09 ` Ihor Radchenko [this message]
2024-05-02 12:36 ` columnview dynamic block - different time summing behaviour for EFFORT and CLOCKSUM Alexander Adolf
2024-05-02 12:59 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8734r0beke.fsf@localhost \
--to=yantar92@posteo.net \
--cc=alexander.adolf@condition-alpha.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).