New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mysterious doctest failure on dyck_word.py #18244
Comments
New commits:
|
Commit: |
Branch: public/18244 |
comment:2
And here is what can be found, based on the more verbose output:
On the other hand, just testing without building (
It looks like a Python integer kills us directly after building sage, but not if we are just testing. |
comment:3
Yes indeed. Very strange. Note that in a console
which is the expected behavior after #17852. |
comment:4
Got it... it is because of unique representation! There is a cache of computed values of
So if the block at lines 3583-3585
is ran before the |
comment:5
Nice work, caching is definitely the problem! :-) However, replacing |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:7
Replying to @behackl:
Argh. I was sure this was the one! I do not want to go through the file again. |
comment:8
Some more information: the problem definitely is, that However, even if I delete the example at lines 3583-3585, the error remains. I haven't really figured out yet where the Python integers magically appear. |
comment:9
The magical appearance of the Python integers is still a mystery, but as your last commit kills all of those, it resolves the bug. As soon as you set the ticket to |
Author: Vincent Delecroix |
Changed author from Vincent Delecroix to none |
comment:11
Replying to @behackl:
I somehow disagree with that analysis that it is a problem that Hence, would it not be a better solution to modify the test so that it accepts both sage and python integers (and infinity)? |
comment:12
Replying to @simon-king-jena:
I like this to be restrictive. See also #18159. I often write things like
which would break if it was a Python integer. Your suggestion implies that I need to do
Moreover, in that particular case, I dislike the behavior of the example in comment:4. Depending on the execution you got a Python int or a Sage integer! This is very bad.
This has to be discussed (maybe on #18159). And which infinity? Vincent |
comment:13
That said, changing the code of Dyck words so that Sage integers are used is a good idea. Nonetheless I think that |
comment:15
Replying to @simon-king-jena:
'Problem' meant that it is/was the reason for the failing doctest. Nevertheless, I'm also in favour of In any case, should this be still part of this ticket? |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Reviewer: Benjamin Hackl |
comment:17
I think it's best to open a separate ticket for the This ticket fixes the issue with the (mysteriously) failing doctest in |
comment:18
Author name missing |
Author: Vincent Delecroix |
comment:19
Sorry! |
comment:20
Thanks for the fix! While you are at it, you may consider making the assertion error even more explicit:
->
I let you decide whether you want to stick this in this ticket. If you do, you can reset a positive review on my behalf after the change (and running the tests). |
Changed branch from public/18244 to |
Several times and on different computers
make ptestlong
produces this single errorsee: this thread on sage-devel
CC: @behackl @nthiery
Component: documentation
Author: Vincent Delecroix
Branch/Commit:
59cb8d2
Reviewer: Benjamin Hackl
Issue created by migration from https://trac.sagemath.org/ticket/18244
The text was updated successfully, but these errors were encountered: