#9921: nose testing suite as an optional spkg
-------------------------------------+--------------------------------------
       Reporter:  jason              |         Owner:  tbd                
           Type:  enhancement        |        Status:  needs_review       
       Priority:  major              |     Milestone:  sage-5.1           
      Component:  optional packages  |    Resolution:                     
       Keywords:  sd41               |   Work issues:                     
Report Upstream:  N/A                |     Reviewers:  Karl-Dieter Crisman
        Authors:  John Palmieri      |     Merged in:                     
   Dependencies:                     |      Stopgaps:                     
-------------------------------------+--------------------------------------
Changes (by kcrisman):

  * reviewer:  => Karl-Dieter Crisman


Old description:

> Several projects we depend on use nose to do self-tests.  In order to
> test these packages, we'd have to have nose installed.
>
> This is fairly simple without an spkg:
>
> {{{
> wget http://pypi.python.org/packages/source/n/nose/nose-1.1.2.tar.gz # or
> the latest version at http://pypi.python.org/pypi/nose/
> tar xzvf nose-1.1.2.tar.gz
> cd nose-1.1.2
> sage -python setup.py install
> }}}
>
> However, it might make sense to have nose be an optional spkg.
>
> Matplotlib relies on nose to do tests
> (http://matplotlib.sourceforge.net/devel/coding_guide.html#testing), as
> well as numpy/scipy
> (http://projects.scipy.org/numpy/wiki/TestingGuidelines).
>
> ---------------
>
> New spkg:
> [http://sage.math.washington.edu/home/palmieri/SPKG/nose-1.1.2.spkg
> version 1.1.2],
> [http://sage.math.washington.edu/home/palmieri/SPKG/nose-1.1.3.git20120614.spkg
> version 1.1.3 from git]
>
> Apply [attachment:trac_9921-nose-scripts.patch] to the scripts repo.

New description:

 Several projects we depend on use nose to do self-tests.  In order to test
 these packages, we'd have to have nose installed.

 This is fairly simple without an spkg:

 {{{
 wget http://pypi.python.org/packages/source/n/nose/nose-1.1.2.tar.gz # or
 the latest version at http://pypi.python.org/pypi/nose/
 tar xzvf nose-1.1.2.tar.gz
 cd nose-1.1.2
 sage -python setup.py install
 }}}

 However, it might make sense to have nose be an optional spkg.

 Matplotlib relies on nose to do tests
 (http://matplotlib.sourceforge.net/devel/coding_guide.html#testing), as
 well as numpy/scipy
 (http://projects.scipy.org/numpy/wiki/TestingGuidelines).

 ---------------

 New spkg:
 [http://sage.math.washington.edu/home/palmieri/SPKG/nose-1.1.2.spkg
 version 1.1.2].

 (Alternate spkg
 [http://sage.math.washington.edu/home/palmieri/SPKG/nose-1.1.3.git20120614.spkg
 version 1.1.3 from git].)

 Apply [attachment:trac_9921-nose-scripts.patch] to the scripts repo.

--

Comment:

 This is ridiculous.  Nose works fine at testing things on sage.math.   It
 certainly finds various errors and warnings - apparently scipy generates a
 number as well, I just tried it.

 The issue with it not passing its own tests is not so good, and I can
 confirm this in both cases.  On the plus side, it only breaks the Sage
 installation process in the 1.1.3, so I would say let's go with the 1.1.2
 for now.

 ----

 I do get something weird, hopefully unrelated to nose itself, but instead
 related to our defaults for matplotlib.
 {{{

 kcrisman@sage:~/sage-5.1.beta1-boxen-x86_64-Linux$ ./sage -c 'import
 matplotlib; matplotlib.test()'
 ======================================================================
 ERROR: Failure: OSError (No such file
 /home/kcrisman/sage-5.1.beta1-boxen-x86_64-Linux/import matplotlib;
 matplotlib.test())
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File
 "/home/kcrisman/sage-5.1.beta1-boxen-x86_64-Linux/local/lib/python2.7
 /site-packages/nose-1.1.2-py2.7.egg/nose/failure.py", line 39, in runTest
     raise self.exc_class(self.exc_val)
 OSError: No such file
 /home/kcrisman/sage-5.1.beta1-boxen-x86_64-Linux/import matplotlib;
 matplotlib.test()

 ----------------------------------------------------------------------
 Ran 1 test in 0.001s

 FAILED (errors=1)

 sage: import matplotlib
 sage: matplotlib.test()
 ======================================================================
 ERROR: Failure: ValueError (Unable to load tests from file
 /home/kcrisman/sage-5.1.beta1-boxen-x86_64-Linux/sage)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File
 "/home/kcrisman/sage-5.1.beta1-boxen-x86_64-Linux/local/lib/python2.7
 /site-packages/nose-1.1.2-py2.7.egg/nose/loader.py", line 213, in
 loadTestsFromFile
     % filename)
 ValueError: Unable to load tests from file
 /home/kcrisman/sage-5.1.beta1-boxen-x86_64-Linux/sage

 ----------------------------------------------------------------------
 Ran 1 test in 0.001s

 FAILED (errors=1)
 False
 }}}


 On a computer without nose:
 {{{

 sage: matplotlib.test()
 ---------------------------------------------------------------------------
 ImportError                               Traceback (most recent call
 last)

 /Users/karl-dietercrisman/Downloads/sage-5.1.beta6/<ipython console> in
 <module>()

 /Users/.../sage-5.1.beta6/local/lib/python2.7/site-
 packages/matplotlib/__init__.pyc in test(verbosity)
     986 def test(verbosity=0):
     987     """run the matplotlib test suite"""
 --> 988     import nose
     989     import nose.plugins.builtin
     990     from testing.noseclasses import KnownFailure

 ImportError: No module named nose
 }}}

 I think that in matplotlib's lib/__init__.py
 {{{

     success = nose.run( defaultTest=default_test_modules,
                         config=config,
                         )
 }}}
 we aren't using the right default modules, they aren't imported or
 something.  So it goes back to just looking at `.` for the default test
 module - I get the same thing.
 {{{

 sage: nose.run(defaultTest='.')
 E
 ======================================================================
 ERROR: Failure: ValueError (Unable to load tests from file
 /home/kcrisman/sage-5.1.beta1-boxen-x86_64-Linux/sage)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File
 "/home/kcrisman/sage-5.1.beta1-boxen-x86_64-Linux/local/lib/python2.7
 /site-packages/nose-1.1.2-py2.7.egg/nose/loader.py", line 213, in
 loadTestsFromFile
     % filename)
 ValueError: Unable to load tests from file
 /home/kcrisman/sage-5.1.beta1-boxen-x86_64-Linux/sage

 ----------------------------------------------------------------------
 Ran 1 test in 0.001s

 FAILED (errors=1)
 False
 }}}

 Can you see a reason why this shouldn't have positive review?  I just
 think this must be a problem in how we're dealing with mpl.  I'm surprised
 it does this; we only removed the baseline images, not the testing
 scripts!

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

Reply via email to