unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master 80abaea: Use lexical-binding in lunar.el and add tests
       [not found] ` <20200607190130.38C4E20A2E@vcs0.savannah.gnu.org>
@ 2020-06-07 22:10   ` Basil L. Contovounesios
  2020-06-08  6:49     ` Stefan Kangas
  2020-06-13 18:52     ` Basil L. Contovounesios
  0 siblings, 2 replies; 3+ messages in thread
From: Basil L. Contovounesios @ 2020-06-07 22:10 UTC (permalink / raw)
  To: emacs-devel; +Cc: Stefan Kangas

stefankangas@gmail.com (Stefan Kangas) writes:

> branch: master
> commit 80abaea1d9c6f1e53fe88befe16de3b219cdd919
> Author: Stefan Kangas <stefankangas@gmail.com>
> Commit: Stefan Kangas <stefankangas@gmail.com>
>
>     Use lexical-binding in lunar.el and add tests
>     
>     * lisp/calendar/lunar.el: Use lexical-binding.
>     (lunar-phases, diary-lunar-phases): Silence byte-compiler.
>     * test/lisp/calendar/lunar-tests.el: New file.

I'm seeing the following test failure:

--8<---------------cut here---------------start------------->8---
cd test; make lunar-tests
make[1]: Entering directory '/home/blc/.local/src/emacs/test'
  GEN      lisp/calendar/lunar-tests.log
Running 5 tests (2020-06-07 23:05:51+0100, selector `(not (tag :unstable))')
   passed  1/5  lunar-test-eclipse-check (0.000202 sec)
   passed  2/5  lunar-test-new-moon-on-or-after (0.002254 sec)
   passed  3/5  lunar-test-new-moon-time (0.000106 sec)
   passed  4/5  lunar-test-phase (0.000145 sec)
Test lunar-test-phase-list backtrace:
  signal(ert-test-failed (((should (equal (lunar-phase-list 3 1871) '(
  ert-fail(((should (equal (lunar-phase-list 3 1871) '(((3 20 1871) "1
  (if (unwind-protect (setq value-12 (apply fn-10 args-11)) (setq form
  (let (form-description-14) (if (unwind-protect (setq value-12 (apply
  (let ((value-12 'ert-form-evaluation-aborted-13)) (let (form-descrip
  (let* ((fn-10 #'equal) (args-11 (condition-case err (let ((signal-ho
  (let ((calendar-latitude 40.1) (calendar-longitude -88.2) (calendar-
  (closure (t) nil (let ((calendar-latitude 40.1) (calendar-longitude 
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name lunar-test-phase-list :documentation 
  ert-run-or-rerun-test(#s(ert--stats :selector (not (tag :unstable)) 
  ert-run-tests((not (tag :unstable)) #f(compiled-function (event-type
  ert-run-tests-batch((not (tag :unstable)))
  ert-run-tests-batch-and-exit((not (tag :unstable)))
  eval((ert-run-tests-batch-and-exit '(not (tag :unstable))) t)
  command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/calendar/lunar-tests
  command-line()
  normal-top-level()
Test lunar-test-phase-list condition:
    (ert-test-failed
     ((should
       (equal
	(lunar-phase-list 3 1871)
	'...))
      :form
      (equal
       ((... "9:03pm" 0 "")
	(... "11:46pm" 1 "**  Eclipse **")
	(... "7:20am" 2 "")
	(... "10:57pm" 3 "**  Eclipse possible **")
	(... "12:06pm" 0 "")
	(... "4:49pm" 1 "")
	(... "3:57pm" 2 "")
	(... "7:29am" 3 "")
	(... "3:46am" 0 "")
	(... "6:02am" 1 ""))
       ((... "11:03pm" 0 "")
	(... "1:46am" 1 "**  Eclipse **")
	(... "9:20am" 2 "")
	(... "12:57am" 3 "**  Eclipse possible **")
	(... "2:06pm" 0 "")
	(... "6:49pm" 1 "")
	(... "5:57pm" 2 "")
	(... "9:29am" 3 "")
	(... "5:46am" 0 "")
	(... "8:02am" 1 "")))
      :value nil :explanation
      (list-elt 0
		(list-elt 1
			  (arrays-of-different-length 6 7 "9:03pm" "11:03pm" first-mismatch-at 0)))))
   FAILED  5/5  lunar-test-phase-list (0.000611 sec)

Ran 5 tests, 4 results as expected, 1 unexpected (2020-06-07 23:05:51+0100, 0.173134 sec)

1 unexpected results:
   FAILED  lunar-test-phase-list
--8<---------------cut here---------------end--------------->8---

In case it matters, my time zone is

  (format-time-string "%Z %z") ; => "IST +0100"

Any ideas?  Thanks,

-- 
Basil



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: master 80abaea: Use lexical-binding in lunar.el and add tests
  2020-06-07 22:10   ` master 80abaea: Use lexical-binding in lunar.el and add tests Basil L. Contovounesios
@ 2020-06-08  6:49     ` Stefan Kangas
  2020-06-13 18:52     ` Basil L. Contovounesios
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Kangas @ 2020-06-08  6:49 UTC (permalink / raw)
  To: Basil L. Contovounesios, emacs-devel

"Basil L. Contovounesios" <contovob@tcd.ie> writes:

> I'm seeing the following test failure:

Thanks for pointing this out.

> Test lunar-test-phase-list condition:
>     (ert-test-failed
>      ((should
>        (equal
> 	(lunar-phase-list 3 1871)
> 	'...))
>       :form
>       (equal
>        ((... "9:03pm" 0 "")
> 	(... "11:46pm" 1 "**  Eclipse **")
> 	(... "7:20am" 2 "")
> 	(... "10:57pm" 3 "**  Eclipse possible **")
> 	(... "12:06pm" 0 "")
> 	(... "4:49pm" 1 "")
> 	(... "3:57pm" 2 "")
> 	(... "7:29am" 3 "")
> 	(... "3:46am" 0 "")
> 	(... "6:02am" 1 ""))
>        ((... "11:03pm" 0 "")
> 	(... "1:46am" 1 "**  Eclipse **")
> 	(... "9:20am" 2 "")
> 	(... "12:57am" 3 "**  Eclipse possible **")
> 	(... "2:06pm" 0 "")
> 	(... "6:49pm" 1 "")
> 	(... "5:57pm" 2 "")
> 	(... "9:29am" 3 "")
> 	(... "5:46am" 0 "")
> 	(... "8:02am" 1 "")))
>       :value nil :explanation
>       (list-elt 0
> 		(list-elt 1
> 			  (arrays-of-different-length 6 7 "9:03pm" "11:03pm" first-mismatch-at 0)))))
>    FAILED  5/5  lunar-test-phase-list (0.000611 sec)

Hmm, so there is a difference of two hours.

Yet I attempt to set the timezone like this in the tests:

  `(let ((calendar-latitude 40.1)
         (calendar-longitude -88.2)
         (calendar-location-name "Urbana, IL")
         (calendar-time-zone -360)
         (calendar-standard-time-zone-name "CST")
         (calendar-time-display-form '(12-hours ":" minutes am-pm)))

Does anyone see if I'm missing to set something important here?

> In case it matters, my time zone is
>
>    (format-time-string "%Z %z") ; => "IST +0100"

Here, I have:

(format-time-string "%Z %z") ; => "CEST +0200"

Which does not make it clearer to me why we have a two hour
difference...

Best regards,
Stefan Kangas



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: master 80abaea: Use lexical-binding in lunar.el and add tests
  2020-06-07 22:10   ` master 80abaea: Use lexical-binding in lunar.el and add tests Basil L. Contovounesios
  2020-06-08  6:49     ` Stefan Kangas
@ 2020-06-13 18:52     ` Basil L. Contovounesios
  1 sibling, 0 replies; 3+ messages in thread
From: Basil L. Contovounesios @ 2020-06-13 18:52 UTC (permalink / raw)
  To: emacs-devel; +Cc: Stefan Kangas

"Basil L. Contovounesios" <contovob@tcd.ie> writes:

> stefankangas@gmail.com (Stefan Kangas) writes:
>
>> branch: master
>> commit 80abaea1d9c6f1e53fe88befe16de3b219cdd919
>> Author: Stefan Kangas <stefankangas@gmail.com>
>> Commit: Stefan Kangas <stefankangas@gmail.com>
>>
>>     Use lexical-binding in lunar.el and add tests
>>     
>>     * lisp/calendar/lunar.el: Use lexical-binding.
>>     (lunar-phases, diary-lunar-phases): Silence byte-compiler.
>>     * test/lisp/calendar/lunar-tests.el: New file.
>
> I'm seeing the following test failure:
>
> cd test; make lunar-tests

[...]

> Test lunar-test-phase-list condition:
>     (ert-test-failed
>      ((should
>        (equal
> 	(lunar-phase-list 3 1871)
> 	'...))
>       :form
>       (equal
>        ((... "9:03pm" 0 "")
> 	(... "11:46pm" 1 "**  Eclipse **")
> 	(... "7:20am" 2 "")
> 	(... "10:57pm" 3 "**  Eclipse possible **")
> 	(... "12:06pm" 0 "")
> 	(... "4:49pm" 1 "")
> 	(... "3:57pm" 2 "")
> 	(... "7:29am" 3 "")
> 	(... "3:46am" 0 "")
> 	(... "6:02am" 1 ""))
>        ((... "11:03pm" 0 "")
> 	(... "1:46am" 1 "**  Eclipse **")
> 	(... "9:20am" 2 "")
> 	(... "12:57am" 3 "**  Eclipse possible **")
> 	(... "2:06pm" 0 "")
> 	(... "6:49pm" 1 "")
> 	(... "5:57pm" 2 "")
> 	(... "9:29am" 3 "")
> 	(... "5:46am" 0 "")
> 	(... "8:02am" 1 "")))
>       :value nil :explanation
>       (list-elt 0
> 		(list-elt 1
> 			  (arrays-of-different-length 6 7 "9:03pm" "11:03pm" first-mismatch-at 0)))))

[...]

> In case it matters, my time zone is
>
>   (format-time-string "%Z %z") ; => "IST +0100"

Looks like I'm not the only one:

Tag a test as unstable
4823fa1077 2020-06-13 10:42:47 -0700
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=4823fa1077e4330bd2574eb54731bb32e6370034

-- 
Basil



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-13 18:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20200607190128.16579.5580@vcs0.savannah.gnu.org>
     [not found] ` <20200607190130.38C4E20A2E@vcs0.savannah.gnu.org>
2020-06-07 22:10   ` master 80abaea: Use lexical-binding in lunar.el and add tests Basil L. Contovounesios
2020-06-08  6:49     ` Stefan Kangas
2020-06-13 18:52     ` Basil L. Contovounesios

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).