#4600: [with patch; needs review] followup issue on sage -only_optional
---------------------+------------------------------------------------------
 Reporter:  was      |        Owner:  mabshoff  
     Type:  defect   |       Status:  new       
 Priority:  major    |    Milestone:  sage-3.2.1
Component:  doctest  |   Resolution:            
 Keywords:           |  
---------------------+------------------------------------------------------
Changes (by was):

  * summary:  followup issue on sage -only_optional => [with patch; needs
              review] followup issue on sage -only_optional

Comment:

 For the referee -- here is a file, and me verifying that the
 -only_optional and -optional options work correctly.   I don't think this
 can go into the actual doctest framework for Sage.   However, that isn't
 really needed since the actual optional doctests in actual code passing is
 test enough (stuff like below gets or will be used all over in the doctest
 framework).
 {{{
 [EMAIL PROTECTED]:~/sage/tmp$ more a.py
 """
 sage: x = 5
 sage: y = x + 2 # optional - gap
 sage: y         # optional - gap
 8
 sage: 2 + 3     # optional - magma
 5
 """
 [EMAIL PROTECTED]:~/sage/tmp$ sage -t -only_optional=gap a.py
 sage -t -only_optional=gap tmp/a.py
 **********************************************************************
 File "/home/wstein/sage/tmp/a.py", line 4:
     : y         # optional - gap
 Expected:
     8
 Got:
     7
 **********************************************************************
 1 items had failures:
    1 of   5 in __main__.example_0
 ***Test Failed*** 1 failures.
 For whitespace errors, see the file /home/wstein/sage/tmp/.doctest_a.py
          [1.6 s]
 exit code: 1024

 ----------------------------------------------------------------------
 The following tests failed:


         sage -t -only_optional=gap tmp/a.py
 Total time for all tests: 1.6 seconds
 [EMAIL PROTECTED]:~/sage/tmp$ sage -t a.py
 sage -t  tmp/a.py
          [1.6 s]

 ----------------------------------------------------------------------
 All tests passed!
 Total time for all tests: 1.6 seconds
 [EMAIL PROTECTED]:~/sage/tmp$ sage -t -only_optional=magma a.py
 sage -t -only_optional=magma tmp/a.py
          [1.6 s]

 ----------------------------------------------------------------------
 All tests passed!
 Total time for all tests: 1.6 seconds
 [EMAIL PROTECTED]:~/sage/tmp$ sage -t -only_optional=magma,gap a.py
 sage -t -only_optional=magma,gap tmp/a.py
 **********************************************************************
 File "/home/wstein/sage/tmp/a.py", line 4:
     : y         # optional - gap
 Expected:
     8
 Got:
     7
 **********************************************************************
 1 items had failures:
    1 of   6 in __main__.example_0
 ***Test Failed*** 1 failures.
 For whitespace errors, see the file /home/wstein/sage/tmp/.doctest_a.py
          [1.7 s]
 exit code: 1024

 ----------------------------------------------------------------------
 The following tests failed:


         sage -t -only_optional=magma,gap tmp/a.py
 Total time for all tests: 1.7 seconds
 [EMAIL PROTECTED]:~/sage/tmp$ sage -t -optional a.py
 sage -t -optional tmp/a.py
 **********************************************************************
 File "/home/wstein/sage/tmp/a.py", line 4:
     : y         # optional - gap
 Expected:
     8
 Got:
     7
 **********************************************************************
 1 items had failures:
    1 of   6 in __main__.example_0
 ***Test Failed*** 1 failures.
 For whitespace errors, see the file /home/wstein/sage/tmp/.doctest_a.py
          [1.7 s]
 exit code: 1024

 ----------------------------------------------------------------------
 The following tests failed:


         sage -t -optional tmp/a.py
 Total time for all tests: 1.7 seconds
 [EMAIL PROTECTED]:~/sage/tmp$
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4600#comment:1>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to