#18558: Test all installed optional packages by default
-------------------------------------+-------------------------------------
       Reporter:  ncohen             |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.8
      Component:  doctest framework  |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Nathann Cohen,     |    Reviewers:  Jeroen Demeyer, Karl-
  Jeroen Demeyer                     |  Dieter Crisman
Report Upstream:  N/A                |  Work issues:
         Branch:  u/jdemeyer/18558   |       Commit:
   Dependencies:  #18456, #18124,    |  e3f463d32d4d05a55f8cee4315bb01d9c5de2da2
  #18559, #18563, #18579, #18581     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by jhpalmieri):

 I think it's easy to automatically run the internet tests. I don't
 actually know if that's a good idea: how often will someone start
 doctesting with internet access (at which point the tag will get added to
 the list) and then lose it during doctesting (they lose their internet
 connection, they take their laptop outside, etc.)?

 Adapted from #13540:
 {{{
 #!diff
 diff --git a/src/sage/doctest/control.py b/src/sage/doctest/control.py
 index ce846b2..7b07f2d 100644
 --- a/src/sage/doctest/control.py
 +++ b/src/sage/doctest/control.py
 @@ -256,6 +256,14 @@ class DocTestController(SageObject):
                      for pkg, versions in optional_pkgs.items():
                          if versions[0] == versions[1]:
                              options.optional.add(pkg)
 +                    # If there is an internet connection, add
 +                    # 'internet' to the list of optional tags.
 +                    try:
 +                        import urllib2
 +                        urllib2.urlopen('http://sagemath.org/')
 +                        options.optional.add('internet')
 +                    except urllib2.URLError:
 +                        pass

                  # Check that all tags are valid
                  for o in options.optional:
 }}}

 I also expect lots of failing internet doctests, and I don't know how to
 fix all of them. For example, I don't understand the doctesting structure
 for the files in `sage/dev` in the first place.

 Of course this all belongs on another ticket, either #13540 or a piece of
 it.

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