#5778: [with patch; needs review] Get p-adic doctest coverage to 100% (depends 
on
#5105)
---------------------------+------------------------------------------------
 Reporter:  roed           |       Owner:  was       
     Type:  defect         |      Status:  new       
 Priority:  major          |   Milestone:  sage-3.4.2
Component:  number theory  |    Keywords:  doctests  
---------------------------+------------------------------------------------

Old description:

> '''Note''': This patch depends on #5105 and will not apply otherwise.
>
> Added p-adics to the reference manual, 100% doctest coverage, converts
> p-adics to new coercion model, good ReST compatibility for files up to
> partway through padic_ZZ_pX_FM_element.pyx (alphabetically), no docbuild
> errors for files later alphabetically.

New description:

 '''Note''':

  * This patch depends on #5105 and will not apply otherwise.
  * It only applies to 3.4.1 at the moment. There are some whitespace
 changes in 3.4.2.a0 that will need to be sorted out, but I (Michael) will
 take care of this even if the patches get a positive review against 3.4.1
 only. If someone wants to rebase this is fine by me :)

 Added p-adics to the reference manual, 100% doctest coverage, converts
 p-adics to new coercion model, good ReST compatibility for files up to
 partway through padic_ZZ_pX_FM_element.pyx (alphabetically), no docbuild
 errors for files later alphabetically.

--

Comment(by mabshoff):

 I am seeing three doctest failure in 3.4.1.final on sage.math:
 {{{
 sage -t -long "devel/sage/sage/rings/integer_ring.pyx"
 **********************************************************************
 File
 "/scratch/mabshoff/sage-3.4.1.final/devel/sage/sage/rings/integer_ring.pyx",
 line 848:
     sage: ZZ.completion(5, 15, print_mode='bars')
 Exception raised:
     Traceback (most recent call last):
       File "/scratch/mabshoff/sage-3.4.1.final/local/bin/ncadoctest.py",
 line 1231, in run_one_test
         self.run_one_example(test, example, filename, compileflags)
       File "/scratch/mabshoff/sage-3.4.1.final/local/bin/sagedoctest.py",
 line 38, in run_one_example
         OrigDocTestRunner.run_one_example(self, test, example, filename,
 compileflags)
       File "/scratch/mabshoff/sage-3.4.1.final/local/bin/ncadoctest.py",
 line 1172, in run_one_example
         compileflags, 1) in test.globs
       File "<doctest __main__.example_25[3]>", line 1, in <module>
         ZZ.completion(Integer(5), Integer(15), print_mode='bars')###line
 848:
     sage: ZZ.completion(5, 15, print_mode='bars')
       File "integer_ring.pyx", line 840, in
 sage.rings.integer_ring.IntegerRing_class.completion
 (sage/rings/integer_ring.c:9144)
     TypeError: completion() got an unexpected keyword argument
 'print_mode'
 **********************************************************************
 1 items had failures:
    1 of   4 in __main__.example_25
 ***Test Failed*** 1 failures.
 For whitespace errors, see the file
 /scratch/mabshoff/sage-3.4.1.final/tmp/.doctest_integer_ring.py
          [2.5 s]
 exit code: 1024

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


         sage -t -long "devel/sage/sage/rings/integer_ring.pyx"
 Total time for all tests: 2.5 seconds
 mabsh...@sage:/scratch/mabshoff/sage-3.4.1.final$ sage -t -long
 devel/sage/sage/rings/padics/padic_capped_relative_element.pyx # 1
 doctests failed
 sage -t -long
 "devel/sage/sage/rings/padics/padic_capped_relative_element.pyx"
 **********************************************************************
 File
 
"/scratch/mabshoff/sage-3.4.1.final/devel/sage/sage/rings/padics/padic_capped_relative_element.pyx",
 line 2283:
     sage: hash(R(17)) #indirect doctest
 Expected:
     17
     1977822444
 Got:
     17
 **********************************************************************
 1 items had failures:
    1 of   5 in __main__.example_57
 ***Test Failed*** 1 failures.
 For whitespace errors, see the file
 
/scratch/mabshoff/sage-3.4.1.final/tmp/.doctest_padic_capped_relative_element.py
          [1.3 s]
 exit code: 1024

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


         sage -t -long
 "devel/sage/sage/rings/padics/padic_capped_relative_element.pyx"
 Total time for all tests: 1.3 seconds
 mabsh...@sage:/scratch/mabshoff/sage-3.4.1.final$ sage -t -long
 devel/sage/sage/rings/padics/padic_ZZ_pX_element.pyx # 2 doctests failed
 sage -t -long "devel/sage/sage/rings/padics/padic_ZZ_pX_element.pyx"
 **********************************************************************
 File
 
"/scratch/mabshoff/sage-3.4.1.final/devel/sage/sage/rings/padics/padic_ZZ_pX_element.pyx",
 line 667:
     sage: _find_val_aprec_test(Zq(25,names='a'), [15, int(75),
 ntl_ZZ(625)])
 Expected:
     (1, 340282366920938463463374607431768211457, 2)
 Got:
     (4, 340282366920938463463374607431768211457, 2)
 **********************************************************************
 File
 
"/scratch/mabshoff/sage-3.4.1.final/devel/sage/sage/rings/padics/padic_ZZ_pX_element.pyx",
 line 699:
     sage: _find_val_aprec_test(Zq(25,names='a'), [15, int(75),
 ntl_ZZ(625)]) #indirect doctest
 Expected:
     (1, 340282366920938463463374607431768211457, 2)
 Got:
     (4, 340282366920938463463374607431768211457, 2)
 **********************************************************************
 2 items had failures:
    1 of   8 in __main__.example_14
    1 of   8 in __main__.example_15
 ***Test Failed*** 2 failures.
 For whitespace errors, see the file
 /scratch/mabshoff/sage-3.4.1.final/tmp/.doctest_padic_ZZ_pX_element.py
          [1.4 s]
 exit code: 1024

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


         sage -t -long
 "devel/sage/sage/rings/padics/padic_ZZ_pX_element.pyx"
 Total time for all tests: 1.4 seconds
 }}}

 Cheers,

 Michael

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5778#comment:25>
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