#19244: Broken doctest in src/sage/categories/fields.py
-------------------------------------+-------------------------------------
       Reporter:  jdemeyer           |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  blocker            |    Milestone:  sage-6.9
      Component:  memleak            |   Resolution:
       Keywords:  random_fail        |    Merged in:
        Authors:  Simon King         |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/SimonKing/broken_doctest_in_src_sage_categories_fields_py|  
0d97c7db960aa058b7cb1c60aea839dbc3d161e9
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by SimonKing):

 The following approach might be even more stable.

 What do we want to test? We want to test that the NEWLY created fields can
 be garbage collected.

 What happens if the test fails? There is an additional garbage collection
 of a PREVIOUSLY created field.

 Hence, we must temporarily prevent all PREVIOUSLY created but uncollected
 objects from garbage collection.

 This could be done by storing the output of gc.get_object() in a variable.
 It creates strong references to all previously created uncollected objects
 and will thus make the test stable.

 What solution do you prefer? I prefer the second solution, since I am not
 sure whether the theory behind my previous solution is correct.

--
Ticket URL: <http://trac.sagemath.org/ticket/19244#comment:3>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to