#8488: Add support for @interact to the Sage library and module for a library of
interacts
------------------------------------------+---------------------------------
Reporter: was | Owner: jason
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-4.4
Component: interact | Keywords:
Author: William Stein, Jason Grout | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------------------------+---------------------------------
Changes (by jhpalmieri):
* status: positive_review => needs_work
Comment:
I applied both patches to 4.3.5 and I'm getting doctest failures:
{{{
sage -t devel/sage/sage/interacts/library.py
**********************************************************************
File
"/mnt/usb1/scratch/palmieri/sage-4.3.5-sage.math.washington.edu-x86_64-Linux/devel
/sage-new/sage/interacts/library.py", line 18:
sage: @interacts.decorator.library_interact
def f(n=Integer(5)): print n
Exception raised:
Traceback (most recent call last):
File
"/mnt/usb1/scratch/palmieri/sage-4.3.5-sage.math.washington.edu-x86_64-Linux/local/bin/ncadoctest.py",
line 1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File
"/mnt/usb1/scratch/palmieri/sage-4.3.5-sage.math.washington.edu-x86_64-Linux/local/bin/sagedoctest.py",
line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename,
compileflags)
File
"/mnt/usb1/scratch/palmieri/sage-4.3.5-sage.math.washington.edu-x86_64-Linux/local/bin/ncadoctest.py",
line 1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_1[2]>", line 1, in <module>
@interacts.decorator.library_interact###line 18:
sage: @interacts.decorator.library_interact
AttributeError: 'module' object has no attribute 'decorator'
**********************************************************************
File
"/mnt/usb1/scratch/palmieri/sage-4.3.5-sage.math.washington.edu-x86_64-Linux/devel
/sage-new/sage/interacts/library.py", line 21:
sage: f() # an interact appears
Exception raised:
Traceback (most recent call last):
File
"/mnt/usb1/scratch/palmieri/sage-4.3.5-sage.math.washington.edu-x86_64-Linux/local/bin/ncadoctest.py",
line 1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File
"/mnt/usb1/scratch/palmieri/sage-4.3.5-sage.math.washington.edu-x86_64-Linux/local/bin/sagedoctest.py",
line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename,
compileflags)
File
"/mnt/usb1/scratch/palmieri/sage-4.3.5-sage.math.washington.edu-x86_64-Linux/local/bin/ncadoctest.py",
line 1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_1[3]>", line 1, in <module>
f() # an interact appears###line 21:
sage: f() # an interact appears
NameError: name 'f' is not defined
**********************************************************************
File
"/mnt/usb1/scratch/palmieri/sage-4.3.5-sage.math.washington.edu-x86_64-Linux/devel
/sage-new/sage/interacts/library.py", line 45:
sage: interacts.decorator.demo()
Exception raised:
Traceback (most recent call last):
File
"/mnt/usb1/scratch/palmieri/sage-4.3.5-sage.math.washington.edu-x86_64-Linux/local/bin/ncadoctest.py",
line 1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File
"/mnt/usb1/scratch/palmieri/sage-4.3.5-sage.math.washington.edu-x86_64-Linux/local/bin/sagedoctest.py",
line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename,
compileflags)
File
"/mnt/usb1/scratch/palmieri/sage-4.3.5-sage.math.washington.edu-x86_64-Linux/local/bin/ncadoctest.py",
line 1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_2[2]>", line 1, in <module>
interacts.decorator.demo()###line 45:
sage: interacts.decorator.demo()
AttributeError: 'module' object has no attribute 'decorator'
**********************************************************************
2 items had failures:
2 of 4 in __main__.example_1
1 of 3 in __main__.example_2
***Test Failed*** 3 failures.
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8488#comment:15>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.