-
-
Notifications
You must be signed in to change notification settings - Fork 528
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
whitespace error in doctest causes A Mysterious Error. #7993
Comments
comment:1
I changed the It now differentiates between a crash and an exception raised by the doctesting code. This patch depends on the patch at #7995. |
comment:2
As for #7995: thanks much for handling this. I'd love to see this in Sage very shortly. Please include the new output in the ticket description! I can try to review this, but I'd rather have a testing framework expert to it. |
comment:3
Attachment: scripts_7993_doctest_error_handling.patch.gz I noticed an existing, unrelated problem. Let def g():
"""
sage: 1 + 1
11
"""
return Then 1 items had failures:
1 of 3 in __main__.example_0
***Test Failed*** 1 failures.
For whitespace errors, see the file /home/.sage//tmp/.doctest_foo.py
[2.0 s]
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/apps/sage/local/bin/sage-ptest", line 361, in <module>
failed_files[F.split('#')[0].split()[2]] = None
IndexError: list index out of range |
comment:4
Anyway, we can make a separate ticket to unify, simplify, and doctest the doctesting framework. I'm not an expert, but the changes look OK. Can we report at least partial results for interrupted tests? |
Author: Willem Jan Palenstijn |
comment:6
Minor update: The patch works for me in daily (i.e., not heavy) use. Any other experiences? |
comment:7
I wanted to try this patch to see if it would by chance solve #7773, but apparently it needs a rebase
Paul |
comment:8
The patch is for the scripts repository, whose root is |
comment:9
sorry, I still cannot apply this patch on 4.3.3, even with
Did I something wrong? |
comment:10
That's strange; the same command works for me in a clean 4.3.3. Also, since all hunks are failing, could it be a line ending problem? (mac vs. unix vs. dos?) |
comment:11
I get:
and:
I thought that |
comment:12
Yes, it does look like it. I don't think |
comment:13
with the patch, we now get with the initial example:
and the whole doctest still produces 22 Segfaults (see #7773). However, instead of say:
we now get:
which is more informative. I thus give a positive review. |
Reviewer: Paul Zimmermann |
Merged: sage-4.3.4.alpha1 |
When doctesting a file
a.sage
containing(note the missing space before the 2), you get:
Component: doctest coverage
Author: Willem Jan Palenstijn
Reviewer: Paul Zimmermann
Merged: sage-4.3.4.alpha1
Issue created by migration from https://trac.sagemath.org/ticket/7993
The text was updated successfully, but these errors were encountered: